Index: background.js =================================================================== --- a/background.js +++ b/background.js @@ -163,6 +163,7 @@ let subscriptionDetails = { [easyListGermany]: { title: "EasyList Germany+EasyList", + filters: ["-ad-banner.", "-ad-big.", "-ad-bottom-", "-ad-button-"], installed: true }, [acceptableAds]: { @@ -191,6 +192,7 @@ this.url = url; this._disabled = false; this._lastDownload = 1234; + this.filters = []; this.homepage = "https://easylist.adblockplus.org/"; this.downloadStatus = params.downloadStatus; @@ -199,6 +201,7 @@ { this.disabled = !!details.disabled; this.title = details.title || ""; + this.filters = this.filters.concat(details.filters); } } Subscription.prototype = @@ -324,6 +327,10 @@ } Filter.fromText = (text) => new Filter(text); + function ActiveFilter() + { + } + function BlockingFilter() { } @@ -334,6 +341,7 @@ RegExpFilter.typeMap = Object.create(null); modules.filterClasses = { + ActiveFilter, BlockingFilter, Filter, RegExpFilter Index: ext/content.js =================================================================== --- a/ext/content.js +++ b/ext/content.js @@ -67,7 +67,6 @@ browser.runtime.sendMessage = (message, responseCallback) => { let messageId = ++maxMessageId; - ext.backgroundPage._sendRawMessage({ type: "message", messageId, @@ -96,4 +95,15 @@ }); } }; + + if (!("tabs" in browser)) + browser.tabs = new Map([[0, {url: "example.com"}]]); + + browser.tabs.get = (...args) => + { + // Extend browser.tabs.get() + const result = Map.prototype.get.apply(browser.tabs, args); + return (result ? Promise.resolve(result) : + Promise.reject(new Error("Tab cannot be found"))); + }; }()); Index: issue-reporter.html =================================================================== --- a/issue-reporter.html +++ b/issue-reporter.html @@ -20,6 +20,8 @@
+ + Index: issue-reporter.js =================================================================== --- a/issue-reporter.js +++ b/issue-reporter.js @@ -17,8 +17,6 @@ "use strict"; -window.ext = {}; - let reportData = new DOMParser().parseFromString("