Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Ventero
Created July 16, 2012 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ventero/3fa78dc4278eed0a6bb9 to your computer and use it in GitHub Desktop.
Save Ventero/3fa78dc4278eed0a6bb9 to your computer and use it in GitHub Desktop.
GM issue 1584 diff
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