mirror of https://github.com/gorhill/uBlock.git
This commit is contained in:
parent
25c27b5ffe
commit
c9c7fedc33
|
@ -300,8 +300,12 @@ var onRootFrameHeadersReceived = function(details) {
|
||||||
var µb = µBlock;
|
var µb = µBlock;
|
||||||
|
|
||||||
// Check if the main_frame is a download
|
// Check if the main_frame is a download
|
||||||
// ...
|
// https://github.com/gorhill/uBlock/issues/111
|
||||||
if ( headerValue(details.responseHeaders, 'content-disposition').lastIndexOf('attachment', 0) === 0 ) {
|
// We will assume that whatever root document is of type
|
||||||
|
// 'application/x-[...]' is a download operation.
|
||||||
|
// I confirmed this also work with original issue:
|
||||||
|
// https://github.com/chrisaljoudi/uBlock/issues/516
|
||||||
|
if ( headerValue(details.responseHeaders, 'content-type').lastIndexOf('application/x-', 0) === 0 ) {
|
||||||
µb.tabContextManager.unpush(tabId, requestURL);
|
µb.tabContextManager.unpush(tabId, requestURL);
|
||||||
} else {
|
} else {
|
||||||
µb.tabContextManager.push(tabId, requestURL);
|
µb.tabContextManager.push(tabId, requestURL);
|
||||||
|
|
Loading…
Reference in New Issue