| Left: | ||
| Right: |
| 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-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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 330 onBeforeRequest: new ext._EventTarget(), | 330 onBeforeRequest: new ext._EventTarget(), |
| 331 handlerBehaviorChanged: chrome.webRequest.handlerBehaviorChanged | 331 handlerBehaviorChanged: chrome.webRequest.handlerBehaviorChanged |
| 332 }; | 332 }; |
| 333 | 333 |
| 334 // Since Chrome 38 requests of type 'object' (e.g. requests | 334 // Since Chrome 38 requests of type 'object' (e.g. requests |
| 335 // initiated by Flash) are mistakenly reported with the type 'other'. | 335 // initiated by Flash) are mistakenly reported with the type 'other'. |
| 336 // https://code.google.com/p/chromium/issues/detail?id=410382 | 336 // https://code.google.com/p/chromium/issues/detail?id=410382 |
| 337 if (parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38) | 337 if (parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38) |
| 338 { | 338 { |
| 339 ext.webRequest.indistinguishableTypes = [ | 339 ext.webRequest.indistinguishableTypes = [ |
| 340 ["OTHER", "OBJECT", "OBJECT_SUBREQUEST", "MEDIA", "FONT"] | 340 ["OTHER", "OBJECT", "OBJECT_SUBREQUEST"] |
|
Wladimir Palant
2015/03/02 19:12:18
This will overshoot. With the previous approach, a
Sebastian Noack
2015/03/02 19:23:11
I felt that it's more correct this way. But fair e
| |
| 341 ]; | 341 ]; |
| 342 } | 342 } |
| 343 else | 343 else |
| 344 { | 344 { |
| 345 ext.webRequest.indistinguishableTypes = [ | 345 ext.webRequest.indistinguishableTypes = [ |
| 346 ["OBJECT", "OBJECT_SUBREQUEST"], | 346 ["OBJECT", "OBJECT_SUBREQUEST"], |
| 347 ["OTHER", "MEDIA", "FONT"] | 347 ["OTHER", "MEDIA", "FONT"] |
| 348 ]; | 348 ]; |
| 349 } | 349 } |
| 350 | 350 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 531 callback(new Page(tab)); | 531 callback(new Page(tab)); |
| 532 } | 532 } |
| 533 else | 533 else |
| 534 { | 534 { |
| 535 ext.pages.open(optionsUrl, callback); | 535 ext.pages.open(optionsUrl, callback); |
| 536 } | 536 } |
| 537 }); | 537 }); |
| 538 }); | 538 }); |
| 539 }; | 539 }; |
| 540 })(); | 540 })(); |
| LEFT | RIGHT |