From a703799580a208beac24c827fcd54b799f46a3d7 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Wed, 7 Oct 2009 11:24:44 +0000 Subject: 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 --- components/redirector.component.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'components/redirector.component.js') 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 -- cgit v1.2.3-70-g09d2