From 32da992f75bf6046a8b1d829e742ef1bf0f98d89 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Fri, 26 Aug 2011 15:07:21 +0200 Subject: Upgrade half ready --- chrome/code/redirect.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'chrome/code/redirect.js') 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; -- cgit v1.2.3-70-g09d2