1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-06-18 09:49:35 +02: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:
kkapsner 2017-02-01 11:15:05 +01:00
parent eb6494eca5
commit 6636e1d68b
2 changed files with 2 additions and 3 deletions

View File

@ -23,7 +23,7 @@
exports.setRandomSupplyByType = setRandomSupplyByType;
function getURL(window){
if (window.location.href === "about:blank"){
if (!window.location.href || window.location.href === "about:blank"){
if (window !== window.parent){
return getURL(window.parent);
}
@ -35,7 +35,6 @@
}
exports.intercept = function intercept({subject: window}, {check, checkStack, ask, notify, prefs}){
var siteStatus = check({url: getURL(window)});
if (siteStatus.mode !== "allow"){
apiNames.forEach(function(name){

View File

@ -6,7 +6,7 @@
"use strict";
function getDomain(window){
if (window.location.href === "about:blank"){
if (!window.location.href || window.location.href === "about:blank"){
if (window !== window.parent){
return getDomain(window.parent);
}