Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/ui.js

Issue 5198627827875840: Issue 424 - Anti-adblock filterlist disabled on extension update (Firefox) (Closed)
Patch Set: Created May 5, 2014, 2:30 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 798 // Add "anti-adblock messages" subscription on first run
799 let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); 799 if (Services.vc.compare(prevVersion, "0.0") == 0)
800 if (subscription)
801 { 800 {
802 subscription.disabled = true; 801 let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl );
803 FilterStorage.addSubscription(subscription); 802 if (subscription)
804 if (subscription instanceof DownloadableSubscription && !subscription.last Download) 803 {
805 Synchronizer.execute(subscription); 804 subscription.disabled = true;
805 FilterStorage.addSubscription(subscription);
806 if (subscription instanceof DownloadableSubscription && !subscription.la stDownload)
807 Synchronizer.execute(subscription);
808 }
806 } 809 }
807 810
808 if (!addSubscription && !addAcceptable) 811 if (!addSubscription && !addAcceptable)
809 return; 812 return;
810 813
811 function notifyUser() 814 function notifyUser()
812 { 815 {
813 let {addTab} = require("appSupport"); 816 let {addTab} = require("appSupport");
814 if (addTab) 817 if (addTab)
815 { 818 {
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], 1920 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
1918 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] 1921 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)]
1919 ]; 1922 ];
1920 1923
1921 onShutdown.add(function() 1924 onShutdown.add(function()
1922 { 1925 {
1923 for (let window in UI.applicationWindows) 1926 for (let window in UI.applicationWindows)
1924 if (UI.isBottombarOpen(window)) 1927 if (UI.isBottombarOpen(window))
1925 UI.toggleBottombar(window); 1928 UI.toggleBottombar(window);
1926 }); 1929 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld