mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 12:36:37 +02:00
First integration of the webextension.
This commit is contained in:
parent
6748771402
commit
25b0d400be
9 changed files with 69 additions and 1 deletions
16
webextension/background.js
Normal file
16
webextension/background.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
console.log("background");
|
||||
browser.tabs.query({}).then(function(tabs){
|
||||
console.log("tabs", tabs);
|
||||
tabs.forEach(function(tab){
|
||||
console.log("tab", tab);
|
||||
browser.pageAction.show(tab.id).then(function(){console.log("success");}, function(){console.log("error");});
|
||||
});
|
||||
});
|
||||
|
||||
browser.tabs.onActivated.addListener(function(tab){
|
||||
browser.pageAction.show(tab.id);
|
||||
});
|
||||
browser.tabs.onUpdate.addistener(function(tab){
|
||||
browser.pageAction.show(tab.id);
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue