Skip to content

Commit

Permalink
Listen for chrome documents being created (i.e. 'about:scriptish').
Browse files Browse the repository at this point in the history
  • Loading branch information
supahgreg committed May 26, 2011
1 parent 1b19637 commit 8177669
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extension/components/scriptish.js
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 8177669

Please sign in to comment.