aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chrome/js/redirect.js13
-rw-r--r--install.rdf4
2 files changed, 11 insertions, 6 deletions
diff --git a/chrome/js/redirect.js b/chrome/js/redirect.js
index 756ae15..bedacf0 100644
--- a/chrome/js/redirect.js
+++ b/chrome/js/redirect.js
@@ -1,8 +1,8 @@
var EXPORTED_SYMBOLS = ['Redirect'];
-function Redirect(exampleUrl, includePattern, redirectUrl, patternType, excludePattern, unescapeMatches, escapeMatches, disabled) {
- this._init(exampleUrl, includePattern, redirectUrl, patternType, excludePattern, unescapeMatches, escapeMatches, disabled);
+function Redirect(description, exampleUrl, includePattern, redirectUrl, patternType, excludePattern, unescapeMatches, escapeMatches, disabled) {
+ this._init(description, exampleUrl, includePattern, redirectUrl, patternType, excludePattern, unescapeMatches, escapeMatches, disabled);
}
//Static
@@ -51,6 +51,7 @@ Redirect.prototype = {
toObject : function() {
return {
+ description : this.description,
exampleUrl : this.exampleUrl,
includePattern : this.includePattern,
excludePattern : this.excludePattern,
@@ -70,6 +71,7 @@ Redirect.prototype = {
},
copyValues : function(other) {
+ this.description = other.description;
this.exampleUrl = other.exampleUrl;
this.includePattern = other.includePattern;
this.excludePattern = other.excludePattern;
@@ -81,7 +83,8 @@ Redirect.prototype = {
},
equals : function(redirect) {
- return this.exampleUrl == redirect.exampleUrl
+ return this.description == redirect.description
+ && this.exampleUrl == redirect.exampleUrl
&& this.includePattern == redirect.includePattern
&& this.excludePattern == redirect.excludePattern
&& this.redirectUrl == redirect.redirectUrl
@@ -168,7 +171,8 @@ Redirect.prototype = {
return new RegExp(this._preparePattern(pattern),"gi");
},
- _init : function(exampleUrl, includePattern, redirectUrl, patternType, excludePattern, unescapeMatches, escapeMatches, disabled) {
+ _init : function(description, exampleUrl, includePattern, redirectUrl, patternType, excludePattern, unescapeMatches, escapeMatches, disabled) {
+ this.description = description || '';
this.exampleUrl = exampleUrl || '';
this.includePattern = includePattern || '';
this.excludePattern = excludePattern || '';
@@ -181,6 +185,7 @@ Redirect.prototype = {
toString : function() {
return 'REDIRECT: {'
+ + '\n\tDescription : ' + this.description
+ '\n\tExample url : ' + this.exampleUrl
+ '\n\tInclude pattern : ' + this.includePattern
+ '\n\tExclude pattern : ' + this.excludePattern
diff --git a/install.rdf b/install.rdf
index 2b677fe..33b40a7 100644
--- a/install.rdf
+++ b/install.rdf
@@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>url-rewriter@papush</em:id>
<em:name>URL Rewriter</em:name>
- <em:version>2.8.4</em:version>
+ <em:version>2.8.5</em:version>
<em:creator>papush</em:creator>
<em:contributor>Einar Egilsson (original author)</em:contributor>
<em:contributor>Noah Luck Easterly</em:contributor>
@@ -21,7 +21,7 @@
<Description>
<em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id>
<em:minVersion>28.0</em:minVersion>
- <em:maxVersion>29.*</em:maxVersion>
+ <em:maxVersion>33.*</em:maxVersion>
</Description>
</em:targetApplication>