Permalink
Browse files

Only process "normal" document-start events.

This is _intended_ to prevent double-runs due to bfcache restoring page state.
  • Loading branch information...
1 parent c729ddd commit c327999d618dd730ada9fd5bab690d9734dc808a @arantius arantius committed Jul 18, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 content/browser.js
View
@@ -27,8 +27,10 @@ GM_BrowserUI.init = function() {
GM_BrowserUI.progressListener = {
onLocationChange:function(aBrowser, aProgress, aRequest, aURI) {
- GM_BrowserUI.gmSvc.runScripts(
- 'document-start', aProgress.DOMWindow, window);
+ if (aProgress.loadType & aProgress.LOAD_CMD_NORMAL) {
+ GM_BrowserUI.gmSvc.runScripts(
+ 'document-start', aProgress.DOMWindow, window);
+ }
},
onStateChange:function() { },
onProgressChange:function() { },

0 comments on commit c327999

Please sign in to comment.