fix: do not create <mark> elements, just wrap found words in <span> and add .css styling

This commit is contained in:
2025-10-06 14:53:24 +03:00
parent 21a120e494
commit 6ba0d2eb7c
7 changed files with 1064 additions and 102 deletions

View File

@@ -1,10 +1,10 @@
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === "complete" && /^https?:/.test(tab.url)) {
if (changeInfo.status === 'complete' && /^https?:/.test(tab.url)) {
chrome.scripting.executeScript({
target: { tabId },
files: ["main.js"]
files: ['main.js']
}).catch(err => {
console.warn("Injection failed:", err);
console.warn('Injection failed:', err);
});
}
});