OLD | NEW |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; | 47 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; |
48 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; | 48 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; |
49 | 49 |
50 // Chrome on Linux does not fully support chrome.notifications until version 35 | 50 // Chrome on Linux does not fully support chrome.notifications until version 35 |
51 // https://code.google.com/p/chromium/issues/detail?id=291485 | 51 // https://code.google.com/p/chromium/issues/detail?id=291485 |
52 var canUseChromeNotifications = require("info").platform == "chromium" | 52 var canUseChromeNotifications = require("info").platform == "chromium" |
53 && "notifications" in chrome | 53 && "notifications" in chrome |
54 && (navigator.platform.indexOf("Linux") == -1 || parseInt(require("info").appl
icationVersion) > 34); | 54 && (navigator.platform.indexOf("Linux") == -1 || parseInt(require("info").appl
icationVersion) > 34); |
55 | 55 |
56 var seenDataCorruption = false; | 56 var seenDataCorruption = false; |
| 57 var filterlistsReinitialized = false; |
57 require("filterNotifier").FilterNotifier.addListener(function(action) | 58 require("filterNotifier").FilterNotifier.addListener(function(action) |
58 { | 59 { |
59 if (action == "load") | 60 if (action == "load") |
60 { | 61 { |
61 var importingOldData = importOldData(); | 62 var importingOldData = importOldData(); |
62 | 63 |
63 var addonVersion = require("info").addonVersion; | 64 var addonVersion = require("info").addonVersion; |
64 var prevVersion = ext.storage.currentVersion; | 65 var prevVersion = ext.storage.currentVersion; |
65 if (prevVersion != addonVersion || FilterStorage.firstRun) | 66 if (prevVersion != addonVersion || FilterStorage.firstRun) |
66 { | 67 { |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 page.sendMessage({type: "clickhide-deactivate"}); | 599 page.sendMessage({type: "clickhide-deactivate"}); |
599 refreshIconAndContextMenu(page); | 600 refreshIconAndContextMenu(page); |
600 }); | 601 }); |
601 | 602 |
602 setTimeout(function() | 603 setTimeout(function() |
603 { | 604 { |
604 var notificationToShow = Notification.getNextToShow(); | 605 var notificationToShow = Notification.getNextToShow(); |
605 if (notificationToShow) | 606 if (notificationToShow) |
606 showNotification(notificationToShow); | 607 showNotification(notificationToShow); |
607 }, 3 * 60 * 1000); | 608 }, 3 * 60 * 1000); |
OLD | NEW |