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-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 21 matching lines...) Expand all Loading... |
32 var defaultMatcher = require("matcher").defaultMatcher; | 32 var defaultMatcher = require("matcher").defaultMatcher; |
33 var Prefs = require("prefs").Prefs; | 33 var Prefs = require("prefs").Prefs; |
34 var Synchronizer = require("synchronizer").Synchronizer; | 34 var Synchronizer = require("synchronizer").Synchronizer; |
35 var Utils = require("utils").Utils; | 35 var Utils = require("utils").Utils; |
36 var Notification = require("notification").Notification; | 36 var Notification = require("notification").Notification; |
37 | 37 |
38 // Some types cannot be distinguished | 38 // Some types cannot be distinguished |
39 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; | 39 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; |
40 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; | 40 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; |
41 | 41 |
| 42 window.setTimeout(function() |
| 43 { |
| 44 // Opera hack: This is the last script to load, asynchronous callbacks can run
now. |
| 45 Utils.runAsync.enable(); |
| 46 }, 0); |
| 47 |
42 var isFirstRun = false; | 48 var isFirstRun = false; |
43 var seenDataCorruption = false; | 49 var seenDataCorruption = false; |
44 require("filterNotifier").FilterNotifier.addListener(function(action) | 50 require("filterNotifier").FilterNotifier.addListener(function(action) |
45 { | 51 { |
46 if (action == "load") | 52 if (action == "load") |
47 { | 53 { |
48 importOldData(); | 54 importOldData(); |
49 | 55 |
50 var addonVersion = require("info").addonVersion; | 56 var addonVersion = require("info").addonVersion; |
51 var prevVersion = localStorage["currentVersion"]; | 57 var prevVersion = localStorage["currentVersion"]; |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 tabs.forEach(refreshIconAndContextMenu); | 754 tabs.forEach(refreshIconAndContextMenu); |
749 }); | 755 }); |
750 }); | 756 }); |
751 | 757 |
752 setTimeout(function() | 758 setTimeout(function() |
753 { | 759 { |
754 var notificationToShow = Notification.getNextToShow(); | 760 var notificationToShow = Notification.getNextToShow(); |
755 if (notificationToShow) | 761 if (notificationToShow) |
756 showNotification(notificationToShow); | 762 showNotification(notificationToShow); |
757 }, 3 * 60 * 1000); | 763 }, 3 * 60 * 1000); |
OLD | NEW |