aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.py2
-rw-r--r--chrome/js/redirector.js16
-rw-r--r--install.rdf5
3 files changed, 12 insertions, 11 deletions
diff --git a/build.py b/build.py
index 874e4a2..10f65da 100644
--- a/build.py
+++ b/build.py
@@ -1,6 +1,6 @@
import os, os.path, zipfile
-xpi = zipfile.ZipFile('redirector-2.6.xpi','w')
+xpi = zipfile.ZipFile('redirector-2.7.xpi','w')
for (root, folders, files) in os.walk('.'):
if 'unittest' in root:
continue
diff --git a/chrome/js/redirector.js b/chrome/js/redirector.js
index 887ce70..0250438 100644
--- a/chrome/js/redirector.js
+++ b/chrome/js/redirector.js
@@ -1,12 +1,12 @@
Components.utils.import("chrome://redirector/content/js/xpcom.js");
Components.utils.import("chrome://redirector/content/js/redirect.js");
Components.utils.import("chrome://redirector/content/js/redirectorprefs.js");
-Components.utils.import("chrome://redirector/content/js/proxyserver.js");
+//Components.utils.import("chrome://redirector/content/js/proxyserver.js");
var EXPORTED_SYMBOLS = ['Redirector', 'rdump'];
function rdump(msg) {
- //dump(msg + '\n');
+ Redirector.debug(msg);
}
Redirector = {
@@ -131,7 +131,7 @@ Redirector = {
for each (redirectString in data.split(':::')) {
if (!redirectString || !redirectString.split) {
continue;
- rdump('Invalid old redirect: ' + redirectString);
+ this.debug('Invalid old redirect: ' + redirectString);
}
var parts = redirectString.split(',,,');
if (parts.length < 5) {
@@ -189,7 +189,7 @@ Redirector = {
return Ci.nsIContentPolicy.ACCEPT;
} //Immediately, otherwise we will log all sorts of crap
- rdump('nsIContentPolicy::ShouldLoad ' + contentLocation.spec);
+ this.debug('nsIContentPolicy::ShouldLoad ' + contentLocation.spec);
try {
//This is also done in getRedirectUrl, but we want to exit as quickly as possible for performance
if (!this._prefs.enabled) {
@@ -239,7 +239,7 @@ Redirector = {
{
try {
let newLocation = newChannel.URI.spec;
- rdump('nsIChannelEventSink::onChannelRedirect ' + newLocation);
+ this.debug('nsIChannelEventSink::onChannelRedirect ' + newLocation);
if (!(newChannel.loadFlags & Ci.nsIChannel.LOAD_DOCUMENT_URI)) {
//We only redirect documents...
@@ -282,7 +282,7 @@ Redirector = {
} catch (e if (e != Cr.NS_BASE_STREAM_WOULD_BLOCK)) {
// We shouldn't throw exceptions here - this will prevent the redirect.
- rdump("Redirector: Unexpected error in onChannelRedirect: " + e + "\n");
+ this.debug("Redirector: Unexpected error in onChannelRedirect: " + e + "\n");
}
},
//end nsIChannelEventSink
@@ -310,8 +310,8 @@ Redirector = {
this.importRedirects(redirectsFile);
}
- RedirectorProxy.start(this._prefs.proxyServerPort);
- rdump('Registering as Proxy Filter');
+ //RedirectorProxy.start(this._prefs.proxyServerPort);
+ //rdump('Registering as Proxy Filter');
//var pps = Cc["@mozilla.org/network/protocol-proxy-service;1"].getService(Ci.nsIProtocolProxyService);
//pps.registerFilter(this, 0);
},
diff --git a/install.rdf b/install.rdf
index f14c8e5..813af8c 100644
--- a/install.rdf
+++ b/install.rdf
@@ -8,8 +8,9 @@
<em:creator>Einar Egilsson</em:creator>
<em:description>Automatically redirects to user-defined urls on certain pages</em:description>
<em:homepageURL>http://einaregilsson.com/projects/redirector/</em:homepageURL>
- <em:optionsURL>chrome://redirector/content/ui/settings.xul</em:optionsURL>
- <em:iconURL>chrome://redirector/skin/redirector.png</em:iconURL>
+ <em:optionsURL>chrome://redirector/content/redirector.html</em:optionsURL>
+ <em:optionsType>3</em:optionsType>
+ <em:iconURL>chrome://redirector/content/images/redirector.png</em:iconURL>
<em:type>2</em:type>
<em:unpack>true</em:unpack>
<em:targetApplication>