| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus extension, | 2 * This file is part of the Adblock Plus extension, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 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 | 36 |
| 37 // Some types cannot be distinguished | 37 // Some types cannot be distinguished |
| 38 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; | 38 RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT; |
| 39 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; | 39 RegExpFilter.typeMap.MEDIA = RegExpFilter.typeMap.FONT = RegExpFilter.typeMap.OT
HER; |
| 40 | 40 |
| 41 var isFirstRun = false; | 41 var isFirstRun = false; |
| 42 var seenDataCorruption = false; |
| 42 require("filterNotifier").FilterNotifier.addListener(function(action) | 43 require("filterNotifier").FilterNotifier.addListener(function(action) |
| 43 { | 44 { |
| 44 if (action == "load") | 45 if (action == "load") |
| 45 { | 46 { |
| 46 importOldData(); | 47 importOldData(); |
| 47 | 48 |
| 48 var addonVersion = require("info").addonVersion; | 49 var addonVersion = require("info").addonVersion; |
| 49 var prevVersion = localStorage["currentVersion"]; | 50 var prevVersion = localStorage["currentVersion"]; |
| 50 if (prevVersion != addonVersion) | 51 if (prevVersion != addonVersion) |
| 51 { | 52 { |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 refreshIconAndContextMenu(windows[i].tabs[j]); | 561 refreshIconAndContextMenu(windows[i].tabs[j]); |
| 561 }); | 562 }); |
| 562 | 563 |
| 563 // Update icon if a tab changes location | 564 // Update icon if a tab changes location |
| 564 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) | 565 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) |
| 565 { | 566 { |
| 566 chrome.tabs.sendRequest(tabId, {reqtype: "clickhide-deactivate"}) | 567 chrome.tabs.sendRequest(tabId, {reqtype: "clickhide-deactivate"}) |
| 567 if(changeInfo.status == "loading") | 568 if(changeInfo.status == "loading") |
| 568 refreshIconAndContextMenu(tab); | 569 refreshIconAndContextMenu(tab); |
| 569 }); | 570 }); |
| OLD | NEW |