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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 var initAntiAdblockNotification = require("antiadblockInit").initAntiAdblockNoti
fication; | 45 var initAntiAdblockNotification = require("antiadblockInit").initAntiAdblockNoti
fication; |
46 | 46 |
47 // Some types cannot be distinguished | 47 // Some types cannot be distinguished |
48 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; | 48 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; |
49 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; | 49 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; |
50 | 50 |
51 // Chrome on Linux does not fully support chrome.notifications until version 35 | 51 // Chrome on Linux does not fully support chrome.notifications until version 35 |
52 // https://code.google.com/p/chromium/issues/detail?id=291485 | 52 // https://code.google.com/p/chromium/issues/detail?id=291485 |
53 var canUseChromeNotifications = require("info").platform == "chromium" | 53 var canUseChromeNotifications = require("info").platform == "chromium" |
54 && "notifications" in chrome | 54 && "notifications" in chrome |
55 && (navigator.platform.indexOf("Linux") == -1 || parseInt(require("info").appl
icationVersion) > 34); | 55 && (navigator.platform.indexOf("Linux") == -1 || parseInt(require("info").appl
icationVersion, 10) > 34); |
56 | 56 |
57 var seenDataCorruption = false; | 57 var seenDataCorruption = false; |
58 var filterlistsReinitialized = false; | 58 var filterlistsReinitialized = false; |
59 require("filterNotifier").FilterNotifier.addListener(function(action) | 59 require("filterNotifier").FilterNotifier.addListener(function(action) |
60 { | 60 { |
61 if (action == "load") | 61 if (action == "load") |
62 { | 62 { |
63 var addonVersion = require("info").addonVersion; | 63 var addonVersion = require("info").addonVersion; |
64 var prevVersion = ext.storage.currentVersion; | 64 var prevVersion = ext.storage.currentVersion; |
65 | 65 |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 page.sendMessage({type: "clickhide-deactivate"}); | 564 page.sendMessage({type: "clickhide-deactivate"}); |
565 refreshIconAndContextMenu(page); | 565 refreshIconAndContextMenu(page); |
566 }); | 566 }); |
567 | 567 |
568 setTimeout(function() | 568 setTimeout(function() |
569 { | 569 { |
570 var notificationToShow = Notification.getNextToShow(); | 570 var notificationToShow = Notification.getNextToShow(); |
571 if (notificationToShow) | 571 if (notificationToShow) |
572 showNotification(notificationToShow); | 572 showNotification(notificationToShow); |
573 }, 3 * 60 * 1000); | 573 }, 3 * 60 * 1000); |
OLD | NEW |