1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 13:48:28 +09:00

Refactor code

This commit is contained in:
Acid Chicken (硫酸鶏) 2020-04-29 06:09:17 +09:00
parent 01411327b8
commit 805472482e
No known key found for this signature in database
GPG Key ID: 5388F56C75B677A1

View File

@ -40,11 +40,11 @@ export default Vue.extend({
if (window.hcaptcha) { // loaded
this.available = true;
} else {
(document.getElementById('hcaptcha') || (x => document.head.appendChild(Object.assign(x, {
(document.getElementById('hcaptcha') || document.head.appendChild(Object.assign(document.createElement('script'), {
async: true,
id: 'hcaptcha',
src: 'https://hcaptcha.com/1/api.js?render=explicit',
})))(document.createElement('script')))
})))
.addEventListener('load', () => this.available = true);
}
},