diff --git a/Extension/browser/chrome/lib/api/background-page.js b/Extension/browser/chrome/lib/api/background-page.js index a84dff430a..6b340c5a4e 100644 --- a/Extension/browser/chrome/lib/api/background-page.js +++ b/Extension/browser/chrome/lib/api/background-page.js @@ -301,6 +301,9 @@ }, setPopup: function () { // Do nothing. Popup is already installed in manifest file + }, + close: function () { + // Do nothing } }; diff --git a/Extension/browser/firefox/lib/mobileMenu.js b/Extension/browser/firefox/lib/mobileMenu.js index 1b79b782d9..d6870915db 100644 --- a/Extension/browser/firefox/lib/mobileMenu.js +++ b/Extension/browser/firefox/lib/mobileMenu.js @@ -24,9 +24,7 @@ var MobileMenu = { nativeMenuIds: Object.create(null), - init: function (UI) { - - this.UI = UI; + init: function () { adguard.windowsImpl.onUpdated.addListener(function (adgWin, domWin, event) { if (event === 'ChromeWindowLoad') { @@ -190,15 +188,15 @@ var MobileMenu = { name: "Adguard", icon: null }); - MobileMenu.createSubMenus(window, menuID); + this.createSubMenus(window, menuID); }, /** * @param window */ removeFromWindow: function (window) { - if (window in MobileMenu.nativeMenuIds) { - var menuId = MobileMenu.nativeMenuIds[window].main; + if (window in this.nativeMenuIds) { + var menuId = this.nativeMenuIds[window].main; window.NativeWindow.menu.remove(menuId); } } diff --git a/Extension/browser/firefox/lib/prefs.js b/Extension/browser/firefox/lib/prefs.js index 0ffecbef25..4d31b8f8f3 100644 --- a/Extension/browser/firefox/lib/prefs.js +++ b/Extension/browser/firefox/lib/prefs.js @@ -51,7 +51,6 @@ var Prefs = { speedupStartup: function () { return SimplePrefs.get('speedup_startup'); }, - collapseByContentScript: true, // SimplePrefs.get('collapse_by_content_script'), useGlobalStyleSheet: SimplePrefs.get('use_global_style_sheet'), ICONS: { @@ -71,13 +70,10 @@ var Prefs = { }; var onPreferenceChanged = function (prefName) { - Prefs.collapseByContentScript = SimplePrefs.get('collapse_by_content_script'); Prefs.useGlobalStyleSheet = SimplePrefs.get('use_global_style_sheet'); EventNotifier.notifyListeners(EventNotifierTypes.CHANGE_PREFS, prefName); }; -SimplePrefs.addListener('collapse_by_content_script', onPreferenceChanged); SimplePrefs.addListener('use_global_style_sheet', onPreferenceChanged); unload.when(function () { - SimplePrefs.removeListener('collapse_by_content_script', onPreferenceChanged); SimplePrefs.removeListener('use_global_style_sheet', onPreferenceChanged); }); \ No newline at end of file diff --git a/Extension/browser/firefox/package.json b/Extension/browser/firefox/package.json index d9f52961b1..0698aaad25 100644 --- a/Extension/browser/firefox/package.json +++ b/Extension/browser/firefox/package.json @@ -18,13 +18,6 @@ "title": "Speedup startup", "description": "Enables asynchronous filters initialization" }, - { - "type": "bool", - "name": "collapse_by_content_script", - "value": true, - "title": "Collapse by content script", - "description": "Enables asynchronous elements blocking by the content script" - }, { "type": "bool", "name": "use_global_style_sheet", diff --git a/Extension/lib/content-message-handler.js b/Extension/lib/content-message-handler.js index ea077188c6..4e54de85bc 100644 --- a/Extension/lib/content-message-handler.js +++ b/Extension/lib/content-message-handler.js @@ -144,12 +144,6 @@ ContentMessageHandler.prototype = { var block = webRequestService.checkWebSocketRequest(sender.tab, message.elementUrl, message.documentUrl); return {block: block, requestId: message.requestId}; case 'processShouldCollapse': - - if (!Prefs.collapseByContentScript) { - // In case of FF we may collapse nodes with nsiContentPolicy - return {collapse: false, requestId: message.requestId}; - } - var collapse = webRequestService.processShouldCollapse(sender.tab, message.elementUrl, message.documentUrl, message.requestType); return {collapse: collapse, requestId: message.requestId}; case 'processShouldCollapseMany': diff --git a/Extension/lib/pages/popup.js b/Extension/lib/pages/popup.js index 2c7e90b446..b1718fdcb2 100644 --- a/Extension/lib/pages/popup.js +++ b/Extension/lib/pages/popup.js @@ -18,7 +18,6 @@ /* global $, PopupController */ var backgroundPage = adguard.backgroundPage.getWindow(); var antiBannerService = backgroundPage.antiBannerService; -var UI = backgroundPage.UI; var uiService = backgroundPage.uiService; var framesMap = backgroundPage.framesMap; var filteringLog = backgroundPage.filteringLog; @@ -96,7 +95,7 @@ $(document).ready(function () { adguard.closePopup(); }; controller.openLink = function (url) { - UI.openTab(url); + uiService.openTab(url); adguard.closePopup(); }; controller.openFilteringLog = function (tabId) {