1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-01-20 18:38:32 +01:00

Fixed bug in reCAPTCHA-confirmation.

Fixes #231.
This commit is contained in:
kkapsner 2018-08-31 19:37:57 +02:00
parent 6ca0239c53
commit 260746f944

View File

@ -260,9 +260,10 @@
const reCaptchaEntry = "^https://www\\.google\\.com/recaptcha/api2/(?:b?frame|anchor).*$"; const reCaptchaEntry = "^https://www\\.google\\.com/recaptcha/api2/(?:b?frame|anchor).*$";
const {url: urlContainer} = settings.getContainers(); const {url: urlContainer} = settings.getContainers();
settings.on("protectWindow", function({newValue}){ settings.on("protectWindow", function({newValue}){
if (newValue){
const urlValue = urlContainer.get(); const urlValue = urlContainer.get();
const matching = urlValue.filter(function(entry){ const matching = urlValue.filter(function(entry){
return entry.url = reCaptchaEntry; return entry.url === reCaptchaEntry;
}); });
if ( if (
newValue && newValue &&
@ -274,6 +275,7 @@
){ ){
settings.set("protectWindow", false, reCaptchaEntry); settings.set("protectWindow", false, reCaptchaEntry);
} }
}
}); });
}); });
}()); }());