| Index: background.js |
| =================================================================== |
| --- a/background.js |
| +++ b/background.js |
| @@ -36,7 +36,9 @@ |
| seenDataCorruption: false, |
| filterlistsReinitialized: false, |
| addSubscription: false, |
| - filterError: false |
| + filterError: false, |
| + downloadStatus: "synchronize_ok", |
| + lastDownload: 1234 |
| }; |
| updateFromURL(params); |
| @@ -71,7 +73,9 @@ |
| this.url = url; |
| this.title = "Subscription " + url; |
| this.disabled = false; |
| - this.lastDownload = 1234; |
| + this._lastDownload = params.lastDownload; |
| + this.homepage = "https://easylist.adblockplus.org/"; |
| + this.downloadStatus = params.downloadStatus; |
|
Thomas Greiner
2016/02/03 14:50:14
Please document those newly introduced parameters
saroyanm
2016/02/03 17:43:11
Done.
|
| }, |
| SpecialSubscription: function(url) |
| @@ -83,6 +87,9 @@ |
| }; |
| modules.subscriptionClasses.Subscription.fromURL = function(url) |
| { |
| + if (url in knownSubscriptions) |
| + return knownSubscriptions[url]; |
| + |
| if (/^https?:\/\//.test(url)) |
| return new modules.subscriptionClasses.Subscription(url); |
| else |
| @@ -90,6 +97,19 @@ |
| }; |
| modules.subscriptionClasses.DownloadableSubscription = modules.subscriptionClasses.Subscription; |
| + modules.subscriptionClasses.Subscription.prototype = |
| + { |
| + get lastDownload() |
| + { |
| + return this._lastDownload; |
| + }, |
| + set lastDownload(value) |
| + { |
| + this._lastDownload = value; |
| + modules.filterNotifier.FilterNotifier.triggerListeners("subscription.lastDownload", this); |
| + } |
| + }; |
| + |
| modules.filterStorage = { |
| FilterStorage: { |
| get subscriptions() |
| @@ -184,7 +204,12 @@ |
| }; |
| modules.synchronizer = { |
| - Synchronizer: {} |
| + Synchronizer: { |
| + execute: function(subscription, manual) |
| + { |
| + subscription.lastDownload = Date.now() / 1000; |
| + } |
| + } |
| }; |
| modules.matcher = { |