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

Side by Side Diff: background.js

Issue 6324527734718464: Issue 424 - Anti-adblock filterlist disabled on extension update (Platform) (Closed)
Patch Set: Created May 5, 2014, 2:34 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 { 213 {
214 subscription.title = "Allow non-intrusive advertising"; 214 subscription.title = "Allow non-intrusive advertising";
215 FilterStorage.addSubscription(subscription); 215 FilterStorage.addSubscription(subscription);
216 if (subscription instanceof DownloadableSubscription && !subscription.last Download) 216 if (subscription instanceof DownloadableSubscription && !subscription.last Download)
217 Synchronizer.execute(subscription); 217 Synchronizer.execute(subscription);
218 } 218 }
219 else 219 else
220 addAcceptable = false; 220 addAcceptable = false;
221 } 221 }
222 222
223 // Add "anti-adblock messages" subscription 223 // Add "anti-adblock messages" subscription on first run
224 var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); 224 if (!prevVersion)
225 if (subscription)
226 { 225 {
227 subscription.disabled = true; 226 var subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl);
228 FilterStorage.addSubscription(subscription); 227 if (subscription)
229 if (subscription instanceof DownloadableSubscription && !subscription.lastDo wnload) 228 {
230 Synchronizer.execute(subscription); 229 subscription.disabled = true;
230 FilterStorage.addSubscription(subscription);
231 if (subscription instanceof DownloadableSubscription && !subscription.last Download)
232 Synchronizer.execute(subscription);
233 }
231 } 234 }
232 235
233 if (!addSubscription && !addAcceptable) 236 if (!addSubscription && !addAcceptable)
234 return; 237 return;
235 238
236 function notifyUser() 239 function notifyUser()
237 { 240 {
238 ext.pages.open(ext.getURL("firstRun.html")); 241 ext.pages.open(ext.getURL("firstRun.html"));
239 } 242 }
240 243
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 page.sendMessage({type: "clickhide-deactivate"}); 598 page.sendMessage({type: "clickhide-deactivate"});
596 refreshIconAndContextMenu(page); 599 refreshIconAndContextMenu(page);
597 }); 600 });
598 601
599 setTimeout(function() 602 setTimeout(function()
600 { 603 {
601 var notificationToShow = Notification.getNextToShow(); 604 var notificationToShow = Notification.getNextToShow();
602 if (notificationToShow) 605 if (notificationToShow)
603 showNotification(notificationToShow); 606 showNotification(notificationToShow);
604 }, 3 * 60 * 1000); 607 }, 3 * 60 * 1000);
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