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-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 { | 788 { |
789 subscription.title = "Allow non-intrusive advertising"; | 789 subscription.title = "Allow non-intrusive advertising"; |
790 FilterStorage.addSubscription(subscription); | 790 FilterStorage.addSubscription(subscription); |
791 if (subscription instanceof DownloadableSubscription && !subscription.la
stDownload) | 791 if (subscription instanceof DownloadableSubscription && !subscription.la
stDownload) |
792 Synchronizer.execute(subscription); | 792 Synchronizer.execute(subscription); |
793 } | 793 } |
794 else | 794 else |
795 addAcceptable = false; | 795 addAcceptable = false; |
796 } | 796 } |
797 | 797 |
798 // Add "anti-adblock messages" subscription on first run | 798 // Add "anti-adblock messages" subscription for new users and users updating
from old ABP versions |
799 if (Services.vc.compare(prevVersion, "0.0") == 0) | 799 if (Services.vc.compare(prevVersion, "2.5") < 0) |
800 { | 800 { |
801 let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl
); | 801 let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl
); |
802 if (subscription) | 802 if (subscription) |
803 { | 803 { |
804 subscription.disabled = true; | 804 subscription.disabled = true; |
805 FilterStorage.addSubscription(subscription); | 805 FilterStorage.addSubscription(subscription); |
806 if (subscription instanceof DownloadableSubscription && !subscription.la
stDownload) | 806 if (subscription instanceof DownloadableSubscription && !subscription.la
stDownload) |
807 Synchronizer.execute(subscription); | 807 Synchronizer.execute(subscription); |
808 } | 808 } |
809 } | 809 } |
810 | 810 |
811 if (!addSubscription && !addAcceptable) | 811 if (!addSubscription && !addAcceptable) |
812 return; | 812 return; |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1920 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
1921 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1921 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
1922 ]; | 1922 ]; |
1923 | 1923 |
1924 onShutdown.add(function() | 1924 onShutdown.add(function() |
1925 { | 1925 { |
1926 for (let window in UI.applicationWindows) | 1926 for (let window in UI.applicationWindows) |
1927 if (UI.isBottombarOpen(window)) | 1927 if (UI.isBottombarOpen(window)) |
1928 UI.toggleBottombar(window); | 1928 UI.toggleBottombar(window); |
1929 }); | 1929 }); |
LEFT | RIGHT |