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
This commit is contained in:
buzz-lightsnack-2007 2024-03-19 14:49:35 +08:00
parent aa19d85417
commit 2c9a55d724

23
scripts/manager.js Normal file
View file

@ -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.");
}
});
});
```*/