Skip to content

Commit

Permalink
converted chrome methods that are not allowed in manifest v3 for #11
Browse files Browse the repository at this point in the history
giraygi committed Feb 20, 2023
1 parent 1fb0a13 commit 049ec1b
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/background.js
Original file line number Diff line number Diff line change
@@ -21,12 +21,12 @@ chrome.runtime.onStartup.addListener(function() {
});

chrome.contextMenus.onClicked.addListener(function(item, tab) {
chrome.tabs.insertCSS({
chrome.scripting.insertCSS({
file: 'static/css/loader.css'
}), chrome.tabs.executeScript({
}), chrome.scripting.executeScript({
code: 'var currentTab = ' + JSON.stringify(tab)
}, function() {
chrome.tabs.executeScript({
chrome.scripting.executeScript({
file: 'static/js/loader.js'
})
});
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"version": "1.2.5",
"background": {
"service_worker": "static/js/background.js",
"module": "static/js/all.js"
"type": "module"
},
"manifest_version": 3,
"content_security_policy": {

0 comments on commit 049ec1b

Please sign in to comment.