mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-18 09:28:52 +01:00
window objects of <frame>s with no url do get the "about:blank" too late -> treat blank URL the same way.
This commit is contained in:
parent
eb6494eca5
commit
6636e1d68b
@ -23,7 +23,7 @@
|
|||||||
exports.setRandomSupplyByType = setRandomSupplyByType;
|
exports.setRandomSupplyByType = setRandomSupplyByType;
|
||||||
|
|
||||||
function getURL(window){
|
function getURL(window){
|
||||||
if (window.location.href === "about:blank"){
|
if (!window.location.href || window.location.href === "about:blank"){
|
||||||
if (window !== window.parent){
|
if (window !== window.parent){
|
||||||
return getURL(window.parent);
|
return getURL(window.parent);
|
||||||
}
|
}
|
||||||
@ -35,7 +35,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.intercept = function intercept({subject: window}, {check, checkStack, ask, notify, prefs}){
|
exports.intercept = function intercept({subject: window}, {check, checkStack, ask, notify, prefs}){
|
||||||
|
|
||||||
var siteStatus = check({url: getURL(window)});
|
var siteStatus = check({url: getURL(window)});
|
||||||
if (siteStatus.mode !== "allow"){
|
if (siteStatus.mode !== "allow"){
|
||||||
apiNames.forEach(function(name){
|
apiNames.forEach(function(name){
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function getDomain(window){
|
function getDomain(window){
|
||||||
if (window.location.href === "about:blank"){
|
if (!window.location.href || window.location.href === "about:blank"){
|
||||||
if (window !== window.parent){
|
if (window !== window.parent){
|
||||||
return getDomain(window.parent);
|
return getDomain(window.parent);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user