| Index: background.js |
| =================================================================== |
| --- a/background.js |
| +++ b/background.js |
| @@ -63,6 +63,22 @@ |
| addSubscription(prevVersion); |
| } |
| } |
| + |
| + // update browser actions when whitelisting might have changed, |
| + // due to loading filters or saving filter changes |
| + if (action == "load" || action == "save") |
| + { |
| + ext.windows.getAll(function(windows) |
| + { |
| + for (var i = 0; i < windows.length; i++) |
| + { |
| + windows[i].getAllTabs(function(tabs) |
| + { |
| + tabs.forEach(refreshIconAndContextMenu); |
| + }); |
| + } |
| + }); |
| + } |
| }); |
| // Special-case domains for which we cannot use style-based hiding rules. |
| @@ -401,18 +417,6 @@ |
| } |
| }); |
| -// Show icon as browser action for all tabs that already exist |
| -ext.windows.getAll(function(windows) |
| -{ |
| - for (var i = 0; i < windows.length; i++) |
| - { |
| - windows[i].getAllTabs(function(tabs) |
| - { |
| - tabs.forEach(refreshIconAndContextMenu); |
| - }); |
| - } |
| -}); |
| - |
| // Update icon if a tab changes location |
| ext.tabs.onLoading.addListener(function(tab) |
| { |