mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
blind fix for captcha on electron
This commit is contained in:
parent
2a63017372
commit
b1c4c759f4
1 changed files with 2 additions and 1 deletions
|
@ -54,8 +54,9 @@ module.exports = React.createClass({
|
||||||
console.log("Loading recaptcha script...");
|
console.log("Loading recaptcha script...");
|
||||||
var scriptTag = document.createElement('script');
|
var scriptTag = document.createElement('script');
|
||||||
window.mx_on_recaptcha_loaded = () => {this._onCaptchaLoaded()};
|
window.mx_on_recaptcha_loaded = () => {this._onCaptchaLoaded()};
|
||||||
|
var protocol = global.location.protocol === "file:" ? "https:" : global.location.protocol;
|
||||||
scriptTag.setAttribute(
|
scriptTag.setAttribute(
|
||||||
'src', global.location.protocol+"//www.google.com/recaptcha/api.js?onload=mx_on_recaptcha_loaded&render=explicit"
|
'src', protocol+"//www.google.com/recaptcha/api.js?onload=mx_on_recaptcha_loaded&render=explicit"
|
||||||
);
|
);
|
||||||
this.refs.recaptchaContainer.appendChild(scriptTag);
|
this.refs.recaptchaContainer.appendChild(scriptTag);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue