Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Do not run document-start scripts every time the tab is focused.

Using .addProgressListener() will fire every time the value in the address bar changes.  Good if you want to act on that, but bat for this use case.  On the other hand, .addTabsProgressListener() filters down to an individual tab's activity (not the entire browser), so doesn't consider tab focus, and doesn't fire then when we don't want it.

Also clean up the noisy un-used parameters to all the other callback functions.
  • Loading branch information...
commit c729ddd4236700c002c78bf4da160a8d88e150cf 1 parent 797d424
@arantius arantius authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 content/browser.js
5 content/browser.js
@@ -26,7 +26,7 @@ GM_BrowserUI.init = function() {
GM_BrowserUI.progressListener = {
- onLocationChange:function(aProgress, aRequest, aURI) {
+ onLocationChange:function(aBrowser, aProgress, aRequest, aURI) {
'document-start', aProgress.DOMWindow, window);
@@ -94,8 +94,7 @@ GM_BrowserUI.chromeLoad = function(e) {
- gBrowser.addProgressListener(GM_BrowserUI.progressListener,
- Components.interfaces.nsIWebProgress.NOTIFY_LOCATION);
+ gBrowser.addTabsProgressListener(GM_BrowserUI.progressListener);
GM_BrowserUI.contentLoad = function(event) {
Please sign in to comment.
Something went wrong with that request. Please try again.