LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 onBeforeRequest: new ext._EventTarget(), | 404 onBeforeRequest: new ext._EventTarget(), |
405 handlerBehaviorChanged: function() | 405 handlerBehaviorChanged: function() |
406 { | 406 { |
407 // Defer handlerBehaviorChanged() until navigation occurs. | 407 // Defer handlerBehaviorChanged() until navigation occurs. |
408 // There wouldn't be any visible effect when calling it earlier, | 408 // There wouldn't be any visible effect when calling it earlier, |
409 // but it's an expensive operation and that way we avoid to call | 409 // but it's an expensive operation and that way we avoid to call |
410 // it multiple times, if multiple filters are added/removed. | 410 // it multiple times, if multiple filters are added/removed. |
411 var onBeforeNavigate = chrome.webNavigation.onBeforeNavigate; | 411 var onBeforeNavigate = chrome.webNavigation.onBeforeNavigate; |
412 if (!onBeforeNavigate.hasListener(propagateHandlerBehaviorChange)) | 412 if (!onBeforeNavigate.hasListener(propagateHandlerBehaviorChange)) |
413 onBeforeNavigate.addListener(propagateHandlerBehaviorChange); | 413 onBeforeNavigate.addListener(propagateHandlerBehaviorChange); |
414 }, | |
415 getIndistinguishableTypes: function() | |
416 { | |
417 return [["OBJECT", "OBJECT_SUBREQUEST"]]; | |
418 } | 414 } |
419 }; | 415 }; |
420 | 416 |
421 chrome.tabs.query({}, function(tabs) | 417 chrome.tabs.query({}, function(tabs) |
422 { | 418 { |
423 tabs.forEach(function(tab) | 419 tabs.forEach(function(tab) |
424 { | 420 { |
425 chrome.webNavigation.getAllFrames({tabId: tab.id}, function(details) | 421 chrome.webNavigation.getAllFrames({tabId: tab.id}, function(details) |
426 { | 422 { |
427 if (details && details.length > 0) | 423 if (details && details.length > 0) |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 ext.windows = { | 581 ext.windows = { |
586 create: function(createData, callback) | 582 create: function(createData, callback) |
587 { | 583 { |
588 chrome.windows.create(createData, function(createdWindow) | 584 chrome.windows.create(createData, function(createdWindow) |
589 { | 585 { |
590 afterTabLoaded(callback)(createdWindow.tabs[0]); | 586 afterTabLoaded(callback)(createdWindow.tabs[0]); |
591 }); | 587 }); |
592 } | 588 } |
593 }; | 589 }; |
594 })(); | 590 })(); |
LEFT | RIGHT |