-
-
Save Ventero/3fa78dc4278eed0a6bb9 to your computer and use it in GitHub Desktop.
GM issue 1584 diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/components/greasemonkey.js b/components/greasemonkey.js | |
index f5dc203..1e1d939 100644 | |
--- a/components/greasemonkey.js | |
+++ b/components/greasemonkey.js | |
@@ -294,6 +294,7 @@ function startup(aService) { | |
var observerService = Components.classes['@mozilla.org/observer-service;1'] | |
.getService(Components.interfaces.nsIObserverService); | |
observerService.addObserver(aService, 'document-element-inserted', false); | |
+ observerService.addObserver(aService, 'content-document-global-created', false); | |
var ios = Components.classes["@mozilla.org/network/io-service;1"] | |
.getService(Components.interfaces.nsIIOService); | |
@@ -383,6 +384,11 @@ service.prototype.observe = function(aSubject, aTopic, aData) { | |
var win = doc.defaultView; | |
this.runScripts('document-start', win); | |
break; | |
+ case 'content-document-global-created': | |
+ var win = aSubject; | |
+ if (!GM_util.isGreasemonkeyable(win.location.href)) break; | |
+ this.runScripts('document-end', win); | |
+ break; | |
} | |
}; | |
diff --git a/content/browser.js b/content/browser.js | |
index e6e9556..eb729e6 100644 | |
--- a/content/browser.js | |
+++ b/content/browser.js | |
@@ -72,6 +72,7 @@ GM_BrowserUI.chromeLoad = function(e) { | |
}; | |
GM_BrowserUI.contentLoad = function(event) { | |
+ return; | |
if (!GM_util.getEnabled()) return; | |
var safeWin = event.target.defaultView; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment