mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 17:02:27 +02:00
this fixes #67
This commit is contained in:
parent
b4dd516421
commit
c61ca9cc2b
@ -62,15 +62,25 @@ var onBeforeRootDocument = function(tabId, details) {
|
|||||||
if ( referrer === '' ) {
|
if ( referrer === '' ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/67
|
||||||
|
// We need to pass the details of the page which opened this popup,
|
||||||
|
// so that the `third-party` option works.
|
||||||
|
var µburi = µb.URI;
|
||||||
|
var referrerHostname = µburi.hostnameFromURI(referrer);
|
||||||
|
var pageDetails = {
|
||||||
|
pageHostname: referrerHostname,
|
||||||
|
pageDomain: µburi.domainFromHostname(referrerHostname)
|
||||||
|
};
|
||||||
//console.debug('Referrer="%s"', referrer);
|
//console.debug('Referrer="%s"', referrer);
|
||||||
|
|
||||||
var reason = false;
|
var reason = false;
|
||||||
if ( µb.getNetFilteringSwitch(pageStore.pageHostname) ) {
|
if ( µb.getNetFilteringSwitch(pageStore.pageHostname) ) {
|
||||||
reason = µb.abpFilters.matchString(
|
reason = µb.abpFilters.matchString(
|
||||||
pageStore,
|
pageDetails,
|
||||||
requestURL,
|
requestURL,
|
||||||
'popup',
|
'popup',
|
||||||
µb.URI.hostnameFromURI(requestURL)
|
µburi.hostnameFromURI(requestURL)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user