From 2c9a55d72496cd68a74af9a224ca6f041472974b Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:49:35 +0800 Subject: [PATCH] created initial manager.js Gemini created code on requesting additional webpage Not yet needed for now, but mighrt be good to have when switching to not allow website's usage --- scripts/manager.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/manager.js diff --git a/scripts/manager.js b/scripts/manager.js new file mode 100644 index 0000000..5ab6243 --- /dev/null +++ b/scripts/manager.js @@ -0,0 +1,23 @@ +/* manager.js +Manage the running of the scripts. +*/ + +/* ```js +chrome.runtime.onInstalled.addListener(function() { + // Request permission for the website. + chrome.permissions.request({ + origins: ["https://example.com"] + }, function(granted) { + // If permission was granted, attach the content script to the website. + if (granted) { + chrome.tabs.executeScript({ + code: 'console.log("Hello from the content script!");' + }); + } else { + // Permission was not granted. Display an error message. + console.error("Error: Permission not granted."); + } + }); +}); +```*/ +