| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 let {Policy} = require("contentPolicy"); | 23 let {Policy} = require("contentPolicy"); |
| 24 let {FilterListener} = require("filterListener"); | 24 let {FilterListener} = require("filterListener"); |
| 25 let {FilterStorage} = require("filterStorage"); | 25 let {FilterStorage} = require("filterStorage"); |
| 26 let {FilterNotifier} = require("filterNotifier"); | 26 let {FilterNotifier} = require("filterNotifier"); |
| 27 let {RequestNotifier} = require("requestNotifier"); | 27 let {RequestNotifier} = require("requestNotifier"); |
| 28 let {Filter} = require("filterClasses"); | 28 let {Filter} = require("filterClasses"); |
| 29 let {Subscription, SpecialSubscription, DownloadableSubscription} = require("sub
scriptionClasses"); | 29 let {Subscription, SpecialSubscription, DownloadableSubscription} = require("sub
scriptionClasses"); |
| 30 let {Synchronizer} = require("synchronizer"); | 30 let {Synchronizer} = require("synchronizer"); |
| 31 let {KeySelector} = require("keySelector"); | 31 let {KeySelector} = require("keySelector"); |
| 32 let {Notification} = require("notification"); | 32 let {Notification} = require("notification"); |
| 33 let {setupAntiAdblockNotification} = require("antiadblock-setup"); | 33 let {initAntiAdblockNotification} = require("antiadblockInit"); |
| 34 | 34 |
| 35 let CustomizableUI; | 35 let CustomizableUI; |
| 36 try | 36 try |
| 37 { | 37 { |
| 38 ({CustomizableUI}) = Cu.import("resource:///modules/CustomizableUI.jsm", null)
; | 38 ({CustomizableUI}) = Cu.import("resource:///modules/CustomizableUI.jsm", null)
; |
| 39 } | 39 } |
| 40 catch (e) | 40 catch (e) |
| 41 { | 41 { |
| 42 // No built-in CustomizableUI API, use our own implementation. | 42 // No built-in CustomizableUI API, use our own implementation. |
| 43 ({CustomizableUI}) = require("customizableUI"); | 43 ({CustomizableUI}) = require("customizableUI"); |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 this.updateIconState(window, window.document.getElementById("abp-toolbarbu
tton")); | 525 this.updateIconState(window, window.document.getElementById("abp-toolbarbu
tton")); |
| 526 }.bind(this)); | 526 }.bind(this)); |
| 527 addBrowserClickListener(window, this.onBrowserClick.bind(this, window)); | 527 addBrowserClickListener(window, this.onBrowserClick.bind(this, window)); |
| 528 | 528 |
| 529 window.document.getElementById("abp-notification-close").addEventListener("c
ommand", function(event) | 529 window.document.getElementById("abp-notification-close").addEventListener("c
ommand", function(event) |
| 530 { | 530 { |
| 531 window.document.getElementById("abp-notification").hidePopup(); | 531 window.document.getElementById("abp-notification").hidePopup(); |
| 532 }, false); | 532 }, false); |
| 533 | 533 |
| 534 // Add "anti-adblock messages" notification | 534 // Add "anti-adblock messages" notification |
| 535 setupAntiAdblockNotification(); | 535 initAntiAdblockNotification(); |
| 536 | 536 |
| 537 let documentCreationObserver = { | 537 let documentCreationObserver = { |
| 538 observe: function(subject, topic, data) | 538 observe: function(subject, topic, data) |
| 539 { | 539 { |
| 540 if (!(subject instanceof Ci.nsIDOMWindow)) | 540 if (!(subject instanceof Ci.nsIDOMWindow)) |
| 541 return; | 541 return; |
| 542 | 542 |
| 543 this.showNextNotification(subject.location.href); | 543 this.showNextNotification(subject.location.href); |
| 544 }.bind(UI) | 544 }.bind(UI) |
| 545 }; | 545 }; |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1912 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
| 1913 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1913 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
| 1914 ]; | 1914 ]; |
| 1915 | 1915 |
| 1916 onShutdown.add(function() | 1916 onShutdown.add(function() |
| 1917 { | 1917 { |
| 1918 for (let window in UI.applicationWindows) | 1918 for (let window in UI.applicationWindows) |
| 1919 if (UI.isBottombarOpen(window)) | 1919 if (UI.isBottombarOpen(window)) |
| 1920 UI.toggleBottombar(window); | 1920 UI.toggleBottombar(window); |
| 1921 }); | 1921 }); |
| LEFT | RIGHT |