aboutsummaryrefslogtreecommitdiff
path: root/chrome/code/redirect.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/code/redirect.js')
-rw-r--r--chrome/code/redirect.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/code/redirect.js b/chrome/code/redirect.js
index f9b7f00..5b977d0 100644
--- a/chrome/code/redirect.js
+++ b/chrome/code/redirect.js
@@ -52,6 +52,24 @@ Redirect.prototype = {
this._rxExclude = this._compile(this._excludePattern);
},
+ toObject : function() {
+ return {
+ exampleUrl : this.exampleUrl,
+ includePattern : this.includePattern,
+ excludePattern : this.excludePattern,
+ redirectUrl : this.redirectUrl,
+ patternType : this.patternType,
+ unescapeMatches : this.unescapeMatches,
+ disabled : !!this.disabled
+ };
+ },
+
+ fromObject : function(o) {
+ for (var prop in o) {
+ this[prop] = o[prop];
+ }
+ },
+
copyValues : function(other) {
this.exampleUrl = other.exampleUrl;
this.includePattern = other.includePattern;