first commit

This commit is contained in:
2025-10-17 14:39:33 +08:00
commit 28bbc3691b
9 changed files with 6388 additions and 0 deletions

22
background.js Normal file
View File

@@ -0,0 +1,22 @@
chrome.action.onClicked.addListener(async (tab) => {
try {
// Inject the modules and then execute the main function
await chrome.scripting.executeScript({
target: { tabId: tab.id },
files: ["fields.js"],
world: "MAIN"
});
await chrome.scripting.executeScript({
target: { tabId: tab.id },
files: ["dom.js"],
world: "MAIN"
});
await chrome.scripting.executeScript({
target: { tabId: tab.id },
files: ["main.js"],
world: "MAIN"
});
} catch (error) {
console.error("Error injecting scripts:", error);
}
});