From 53846831aecade74980349949f24d88f33a55c04 Mon Sep 17 00:00:00 2001
From: Einar Egilsson
Date: Sat, 7 Jan 2012 23:11:39 +0100
Subject: 2.7
---
build.py | 2 +-
chrome/js/redirector.js | 16 ++++++++--------
install.rdf | 5 +++--
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 @@
Einar Egilsson
Automatically redirects to user-defined urls on certain pages
http://einaregilsson.com/projects/redirector/
- chrome://redirector/content/ui/settings.xul
- chrome://redirector/skin/redirector.png
+ chrome://redirector/content/redirector.html
+ 3
+ chrome://redirector/content/images/redirector.png
2
true
--
cgit v1.2.3-70-g09d2