Permalink
Browse files

Listen for chrome documents being created (i.e. 'about:scriptish').

  • Loading branch information...
supahgreg committed May 26, 2011
1 parent 1b19637 commit 8177669ce1ea7674ce53fa3f40ca1f709fe9fcee
Showing with 2 additions and 0 deletions.
  1. +2 −0 extension/components/scriptish.js
@@ -42,6 +42,7 @@ function ScriptishService() {
delete this.updateChk;
}
+ Services.obs.addObserver(this, "chrome-document-global-created", false);
Services.obs.addObserver(this, "content-document-global-created", false);
Services.obs.addObserver(this, "inner-window-destroyed", false);
Services.obs.addObserver(this, "install-userscript", false);
@@ -61,6 +62,7 @@ ScriptishService.prototype = {
observe: function(aSubject, aTopic, aData) {
switch (aTopic) {
+ case "chrome-document-global-created":
case "content-document-global-created":
this.docReady(aSubject, Scriptish_getBrowserForContentWindow(aSubject));
break;

0 comments on commit 8177669

Please sign in to comment.