mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Do not intercept when the SOP is in the way.
This commit is contained in:
parent
2a3abbcec7
commit
6c47397d46
2 changed files with 20 additions and 1 deletions
10
lib/frame.js
10
lib/frame.js
|
@ -83,6 +83,16 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
var href = window.location.href;
|
||||
}
|
||||
catch (e){
|
||||
// we are unable to read the location due to SOP
|
||||
// therefore we also can not intercept anything.
|
||||
log("NOT intercepting window du to SOP", window);
|
||||
return false;
|
||||
}
|
||||
|
||||
log("intercepting window", window);
|
||||
intercept(
|
||||
{subject: window},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue