diff options
-rw-r--r-- | chrome/content/redirectList.js | 4 | ||||
-rw-r--r-- | components/redirector.js | 20 | ||||
-rw-r--r-- | install.rdf | 2 |
3 files changed, 12 insertions, 14 deletions
diff --git a/chrome/content/redirectList.js b/chrome/content/redirectList.js index cd8c550..7583f5f 100644 --- a/chrome/content/redirectList.js +++ b/chrome/content/redirectList.js @@ -156,7 +156,3 @@ var RedirectList = { } }; - -window.addEventListener('unload', function() { - Redirector.unload(); -}, false);
\ No newline at end of file diff --git a/components/redirector.js b/components/redirector.js index aa86bea..09ef35e 100644 --- a/components/redirector.js +++ b/components/redirector.js @@ -42,15 +42,17 @@ function RedirectorPolicy() { data = this.prefBranch.getCharPref('redirects');
var arr;
this.list = [];
- for each (redirectString in data.split(':::')) {
- arr = redirectString.split(',,,');
- this.list.push({
- exampleUrl : arr[0],
- pattern : arr[1],
- redirectUrl : arr[2],
- patternType : arr[3],
- excludePattern : arr[4]
- });
+ if (data != '') {
+ for each (redirectString in data.split(':::')) {
+ arr = redirectString.split(',,,');
+ this.list.push({
+ exampleUrl : arr[0],
+ pattern : arr[1],
+ redirectUrl : arr[2],
+ patternType : arr[3],
+ excludePattern : arr[4]
+ });
+ }
}
}
diff --git a/install.rdf b/install.rdf index cabc2ac..146c665 100644 --- a/install.rdf +++ b/install.rdf @@ -5,7 +5,7 @@ <Description about="urn:mozilla:install-manifest"> <em:id>redirector@einaregilsson.com</em:id> <em:name>Redirector</em:name> - <em:version>1.7</em:version> + <em:version>1.7.1</em:version> <em:creator>Einar Egilsson</em:creator> <em:description>Automatically redirects to user-defined urls on certain pages</em:description> <em:homepageURL>http://tech.einaregilsson.com/projects/redirector/</em:homepageURL> |