| OLD | NEW |
| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // it multiple times, if multiple filters are added/removed. | 353 // it multiple times, if multiple filters are added/removed. |
| 354 var onBeforeNavigate = chrome.webNavigation.onBeforeNavigate; | 354 var onBeforeNavigate = chrome.webNavigation.onBeforeNavigate; |
| 355 if (!onBeforeNavigate.hasListener(propagateHandlerBehaviorChange)) | 355 if (!onBeforeNavigate.hasListener(propagateHandlerBehaviorChange)) |
| 356 onBeforeNavigate.addListener(propagateHandlerBehaviorChange); | 356 onBeforeNavigate.addListener(propagateHandlerBehaviorChange); |
| 357 } | 357 } |
| 358 }; | 358 }; |
| 359 | 359 |
| 360 // Since Chrome 38 requests of type 'object' (e.g. requests | 360 // Since Chrome 38 requests of type 'object' (e.g. requests |
| 361 // initiated by Flash) are mistakenly reported with the type 'other'. | 361 // initiated by Flash) are mistakenly reported with the type 'other'. |
| 362 // https://code.google.com/p/chromium/issues/detail?id=410382 | 362 // https://code.google.com/p/chromium/issues/detail?id=410382 |
| 363 if (parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38) | 363 var match = navigator.userAgent.match(/\bChrome\/(\d+)/); |
| 364 if (match && parseInt(match[1], 10) >= 38) |
| 364 { | 365 { |
| 365 ext.webRequest.indistinguishableTypes = [ | 366 ext.webRequest.indistinguishableTypes = [ |
| 366 ["OTHER", "OBJECT", "OBJECT_SUBREQUEST"] | 367 ["OTHER", "OBJECT", "OBJECT_SUBREQUEST"] |
| 367 ]; | 368 ]; |
| 368 } | 369 } |
| 369 else | 370 else |
| 370 { | 371 { |
| 371 ext.webRequest.indistinguishableTypes = [ | 372 ext.webRequest.indistinguishableTypes = [ |
| 372 ["OBJECT", "OBJECT_SUBREQUEST"], | 373 ["OBJECT", "OBJECT_SUBREQUEST"], |
| 373 ["OTHER", "MEDIA", "FONT"] | 374 ["OTHER", "MEDIA", "FONT"] |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 callback(new Page(tab)); | 654 callback(new Page(tab)); |
| 654 } | 655 } |
| 655 else | 656 else |
| 656 { | 657 { |
| 657 ext.pages.open(optionsUrl, callback); | 658 ext.pages.open(optionsUrl, callback); |
| 658 } | 659 } |
| 659 }); | 660 }); |
| 660 }); | 661 }); |
| 661 }; | 662 }; |
| 662 })(); | 663 })(); |
| OLD | NEW |