| Index: lib/subscriptionClasses.js |
| =================================================================== |
| --- a/lib/subscriptionClasses.js |
| +++ b/lib/subscriptionClasses.js |
| @@ -12,17 +12,17 @@ |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| "use strict"; |
| -const {Subscription, SpecialSubscription, DownloadableSubscription} = |
| +const {Subscription, UserDefinedSubscription, DownloadableSubscription} = |
| require("compiled"); |
| /** |
| * This property allows iterating over the list of filters. It will delete |
| * references automatically at the end of the current loop iteration. If you |
| * need persistent references or element access by position you should use |
| * Subscription.filterAt() instead. |
| * @type {Iterable} |
| @@ -46,11 +46,45 @@ |
| filter.delete(); |
| } |
| } |
| }.bind(this) |
| }; |
| } |
| }); |
| +Object.defineProperty(DownloadableSubscription.prototype, "expires", { |
| + get() |
|
hub
2017/10/11 19:42:02
I chose to make the aliases non enumerable.
|
| + { |
| + return this.hardExpiration; |
| + }, |
| + set(value) |
| + { |
| + this.hardExpiration = value; |
| + } |
| +}); |
| + |
| +Object.defineProperty(DownloadableSubscription.prototype, "errors", { |
| + get() |
| + { |
| + return this.errorCount; |
| + }, |
| + set(value) |
| + { |
| + this.errorCount = value; |
| + } |
| +}); |
| + |
| +Object.defineProperty(DownloadableSubscription.prototype, "version", { |
| + get() |
| + { |
| + return this.dataRevision; |
| + }, |
| + set(value) |
| + { |
| + this.dataRevision = value; |
| + } |
| +}); |
| + |
| exports.Subscription = Subscription; |
| -exports.SpecialSubscription = SpecialSubscription; |
| +exports.UserDefinedSubscription = UserDefinedSubscription; |
| +exports.SpecialSubscription = UserDefinedSubscription; |
| exports.DownloadableSubscription = DownloadableSubscription; |