mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
this "fixes" #281
This commit is contained in:
parent
a622786c77
commit
be3f0cac07
1 changed files with 9 additions and 4 deletions
|
|
@ -235,15 +235,20 @@ var cr410382Workaround = function(details) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/281
|
||||||
|
// Looks like Chrome 38 (but not 39) doesn't provide the expected request
|
||||||
|
// header `X-Requested-With`. Sigh.
|
||||||
|
var requestType = 'object';
|
||||||
|
|
||||||
// Lookup "X-Requested-With" header: this will tell us whether the request
|
// Lookup "X-Requested-With" header: this will tell us whether the request
|
||||||
// is of type "object".
|
// is of type "object".
|
||||||
// Reference: https://code.google.com/p/chromium/issues/detail?id=145090
|
// Reference: https://code.google.com/p/chromium/issues/detail?id=145090
|
||||||
var requestedWith = headerValue(details.requestHeaders, 'x-requested-with');
|
//var requestedWith = headerValue(details.requestHeaders, 'x-requested-with');
|
||||||
|
|
||||||
// Reference: https://codereview.chromium.org/451923002/patch/120001/130008
|
// Reference: https://codereview.chromium.org/451923002/patch/120001/130008
|
||||||
var requestType = requestedWith.indexOf('ShockwaveFlash') !== -1 ?
|
//var requestType = requestedWith.indexOf('ShockwaveFlash') !== -1 ?
|
||||||
'object' :
|
// 'object' :
|
||||||
'other';
|
// 'other';
|
||||||
|
|
||||||
// Lookup the page store associated with this tab id.
|
// Lookup the page store associated with this tab id.
|
||||||
var pageStore = µb.pageStoreFromTabId(details.tabId);
|
var pageStore = µb.pageStoreFromTabId(details.tabId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue