mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +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;
|
||||
|
||||
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){
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user