diff options
author | Einar Egilsson | 2009-10-07 11:24:44 +0000 |
---|---|---|
committer | Einar Egilsson | 2009-10-07 11:24:44 +0000 |
commit | a703799580a208beac24c827fcd54b799f46a3d7 (patch) | |
tree | 5dc5b71933534189abee7bd4c40f26fbaa0c125d /components/redirector.component.js | |
parent | 96966ca83f96ed1babcd2bd23aa68feb63fbb7a7 (diff) |
Finally working normally again after massive refactoring.
Disabling single redirects works but needs more GUI work.
Added Redirector log file since the Error Console keeps deleting our messages.
git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@253 119bf307-c92d-0410-89bd-8f53e6181181
Diffstat (limited to 'components/redirector.component.js')
-rw-r--r-- | components/redirector.component.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/redirector.component.js b/components/redirector.component.js index a4e4c7f..1ed0764 100644 --- a/components/redirector.component.js +++ b/components/redirector.component.js @@ -5,20 +5,20 @@ const CSSB_CID = Components.ID("{b7a7a54f-0581-47ff-b086-d6920cb7a3f7}"); var Cc = Components.classes;
var Ci = Components.interfaces;
var Cr = Components.results;
-var kRedirectorWildcard = 'W';
-var kRedirectorRegex= 'R';
var nsIContentPolicy = Ci.nsIContentPolicy;
function Redirector() {
this.init();
}
+const loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader);
+
try {
- Cc["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript('chrome://redirector/content/code/redirector.prototype.js');
+ loader.loadSubScript('chrome://redirector/content/code/redirector.prototype.js');
+ loader.loadSubScript('chrome://redirector/content/code/redirect.js');
} catch(e) {
- Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).logStringMessage('REDIRECTOR: Loading Redirector implementation failed: ' + e);
+ for (i in e)
+ Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).logStringMessage('REDIRECTOR: Loading Redirector implementation failed: ' + i + e[i]);
}
/*
* Factory object
|