Refactor code
This commit is contained in:
parent
01411327b8
commit
805472482e
@ -40,11 +40,11 @@ export default Vue.extend({
|
|||||||
if (window.hcaptcha) { // loaded
|
if (window.hcaptcha) { // loaded
|
||||||
this.available = true;
|
this.available = true;
|
||||||
} else {
|
} else {
|
||||||
(document.getElementById('hcaptcha') || (x => document.head.appendChild(Object.assign(x, {
|
(document.getElementById('hcaptcha') || document.head.appendChild(Object.assign(document.createElement('script'), {
|
||||||
async: true,
|
async: true,
|
||||||
id: 'hcaptcha',
|
id: 'hcaptcha',
|
||||||
src: 'https://hcaptcha.com/1/api.js?render=explicit',
|
src: 'https://hcaptcha.com/1/api.js?render=explicit',
|
||||||
})))(document.createElement('script')))
|
})))
|
||||||
.addEventListener('load', () => this.available = true);
|
.addEventListener('load', () => this.available = true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user