1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Fix fields hosted on braintree when window API is protected

Fixes #417
This commit is contained in:
kkapsner 2020-01-02 11:41:13 +01:00
parent b361733c73
commit d09340e84f
10 changed files with 89 additions and 37 deletions

View file

@ -48,8 +48,14 @@
const temp = {
get name(){
return checkerWrapper(checker, this, arguments, function(args, check){
const {notify, original} = check;
const {notify, original, prefs} = check;
const originalName = original.call(this, ...args);
if (
this !== this.top &&
prefs("allowWindowNameInFrames", this.location)
){
return originalName;
}
const returnedName = windowNames.get(this) || "";
if (originalName !== returnedName){
notify("fakedWindowReadout");