diff options
Diffstat (limited to 'ceee/firefox/content/userscript_api.js')
-rw-r--r-- | ceee/firefox/content/userscript_api.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ceee/firefox/content/userscript_api.js b/ceee/firefox/content/userscript_api.js index 87522d9..e5a760a 100644 --- a/ceee/firefox/content/userscript_api.js +++ b/ceee/firefox/content/userscript_api.js @@ -678,7 +678,14 @@ UserScriptManager.prototype.runUserScripts = function(w) { // these scripts in memory, then we will need a Chrome extension autoupdate // automation notification. - ceee.logInfo('runUserScripts: starting'); + // If there is already a sandbox for this window, then it means the user + // scripts have already been run. Don't need to run them again. + if (w.ceeeSandbox) { + ceee.logInfo('runUserScripts: already ran url=' + w.location.toString()); + return; + } + + ceee.logInfo('runUserScripts: starting for url=' + w.location.toString()); var s = prepareSandbox(w); // Run each user script whose pattern matches the URL of content window. |