Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1b46ab7

Browse files
committed
blind fix for captcha on electron
1 parent 9bf9816 commit 1b46ab7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/views/login/CaptchaForm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ module.exports = React.createClass({
5454
console.log("Loading recaptcha script...");
5555
var scriptTag = document.createElement('script');
5656
window.mx_on_recaptcha_loaded = () => {this._onCaptchaLoaded()};
57+
var protocol = global.location.protocol === "file:" ? "https:" : global.location.protocol;
5758
scriptTag.setAttribute(
58-
'src', global.location.protocol+"//www.google.com/recaptcha/api.js?onload=mx_on_recaptcha_loaded&render=explicit"
59+
'src', protocol+"//www.google.com/recaptcha/api.js?onload=mx_on_recaptcha_loaded&render=explicit"
5960
);
6061
this.refs.recaptchaContainer.appendChild(scriptTag);
6162
}

0 commit comments

Comments
 (0)