Skip to content

Commit

Permalink
Only process "normal" document-start events.
Browse files Browse the repository at this point in the history
This is _intended_ to prevent double-runs due to bfcache restoring page state.
  • Loading branch information
arantius committed Jul 18, 2011
1 parent c729ddd commit c327999
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() { },
Expand Down

0 comments on commit c327999

Please sign in to comment.