1
0
Fork 0
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:
kkapsner 2016-12-20 23:55:45 +01:00
parent 6748771402
commit 25b0d400be
9 changed files with 69 additions and 1 deletions

View 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);
});