initialise extension
This commit is contained in:
parent
424809ea7f
commit
bb512c3848
2 changed files with 22 additions and 2 deletions
|
@ -5,7 +5,27 @@
|
||||||
// let content = browser.i18n.getMessage("notificationContent", message.url);
|
// let content = browser.i18n.getMessage("notificationContent", message.url);
|
||||||
}) */
|
}) */
|
||||||
|
|
||||||
|
chrome.runtime.onInstalled.addListener(function(details) {
|
||||||
|
|
||||||
|
if(details.reason == "install"){
|
||||||
|
chrome.storage.sync.set({
|
||||||
|
'hiddenItemsList': '{}'
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log('Successfully initialised new install');
|
||||||
|
} else if ( details.reason == "update" ) {
|
||||||
|
console.log('Extension updated');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
chrome.action.onClicked.addListener(async tab => {
|
chrome.action.onClicked.addListener(async tab => {
|
||||||
|
var hiddenItemsList;
|
||||||
|
|
||||||
|
chrome.storage.sync.get(['hiddenItemsList'], function(result) {
|
||||||
|
hiddenItemsList = JSON.parse(result.hiddenItemsList);
|
||||||
|
console.log(hiddenItemsList);
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await chrome.scripting.insertCSS({
|
await chrome.scripting.insertCSS({
|
||||||
target: {
|
target: {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "eBay Item Remove - DEVELOPMENT BUILD",
|
"name": "eBay Item Remove - DEVELOPMENT BUILD",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
|
|
||||||
"description": "Remove items you don't want to see from eBay",
|
"description": "Remove items you don't want to see from eBay",
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"service_worker": "background-script.js"
|
"service_worker": "background-script.js"
|
||||||
},
|
},
|
||||||
|
|
||||||
"permissions": [ "notifications", "webNavigation", "scripting" ],
|
"permissions": [ "notifications", "webNavigation", "scripting", "storage" ],
|
||||||
|
|
||||||
"host_permissions": [ "*://*.ebay.co.uk/*" ]
|
"host_permissions": [ "*://*.ebay.co.uk/*" ]
|
||||||
}
|
}
|
Loading…
Reference in a new issue