Fix error in botguard detection
access to top.opener would throw a SecurityError if opened from intel link.
This commit is contained in:
parent
507ec8c8ee
commit
57fc2295b3
@ -21,8 +21,12 @@ window.extractFromStock = function() {
|
|||||||
if(!window[topLevel]) continue;
|
if(!window[topLevel]) continue;
|
||||||
// need an example for a request object
|
// need an example for a request object
|
||||||
for(var property in window[topLevel]) {
|
for(var property in window[topLevel]) {
|
||||||
if(window[topLevel][property] == "getRegionScoreDetails") {
|
try {
|
||||||
return Object.getPrototypeOf(window[topLevel]);
|
if(window[topLevel][property] == "getRegionScoreDetails") {
|
||||||
|
return Object.getPrototypeOf(window[topLevel]);
|
||||||
|
}
|
||||||
|
} catch(e) { // might throw SecurityError or others (noticed on top.opener, which might be cross-origin)
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user