| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 require("filterNotifier").FilterNotifier.addListener(function(action) | 58 require("filterNotifier").FilterNotifier.addListener(function(action) |
| 59 { | 59 { |
| 60 if (action == "load") | 60 if (action == "load") |
| 61 { | 61 { |
| 62 var importingOldData = importOldData(); | 62 var importingOldData = importOldData(); |
| 63 | 63 |
| 64 var addonVersion = require("info").addonVersion; | 64 var addonVersion = require("info").addonVersion; |
| 65 var prevVersion = ext.storage.currentVersion; | 65 var prevVersion = ext.storage.currentVersion; |
| 66 | 66 |
| 67 // There are no filters stored so we need to reinitialize all filterlists | 67 // There are no filters stored so we need to reinitialize all filterlists |
| 68 if (FilterStorage.subscriptions.length === 0) | 68 if (!FilterStorage.firstRun && FilterStorage.subscriptions.length === 0) |
| 69 { | 69 { |
| 70 filterlistsReinitialized = true; | 70 filterlistsReinitialized = true; |
| 71 prevVersion = null; | 71 prevVersion = null; |
| 72 } | 72 } |
| 73 | 73 |
| 74 if (prevVersion != addonVersion || FilterStorage.firstRun) | 74 if (prevVersion != addonVersion || FilterStorage.firstRun) |
| 75 { | 75 { |
| 76 seenDataCorruption = prevVersion && FilterStorage.firstRun; | 76 seenDataCorruption = prevVersion && FilterStorage.firstRun; |
| 77 ext.storage.currentVersion = addonVersion; | 77 ext.storage.currentVersion = addonVersion; |
| 78 if (!importingOldData) | 78 if (!importingOldData) |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 page.sendMessage({type: "clickhide-deactivate"}); | 607 page.sendMessage({type: "clickhide-deactivate"}); |
| 608 refreshIconAndContextMenu(page); | 608 refreshIconAndContextMenu(page); |
| 609 }); | 609 }); |
| 610 | 610 |
| 611 setTimeout(function() | 611 setTimeout(function() |
| 612 { | 612 { |
| 613 var notificationToShow = Notification.getNextToShow(); | 613 var notificationToShow = Notification.getNextToShow(); |
| 614 if (notificationToShow) | 614 if (notificationToShow) |
| 615 showNotification(notificationToShow); | 615 showNotification(notificationToShow); |
| 616 }, 3 * 60 * 1000); | 616 }, 3 * 60 * 1000); |
| LEFT | RIGHT |