This commit is contained in:
2026-05-06 14:48:12 +03:00
parent f1e8a9f8da
commit 711810d8c2
6 changed files with 109 additions and 82 deletions
+13 -13
View File
@@ -267,19 +267,19 @@
console.error('API health check failed:', textStatus, errorThrown);
});
}
function getRecaptchaWebKey() {
return $.get('/api/contact').done(function (res) {
reCaptchaSiteKey = res;
if (reCaptchaSiteKey && !window.__recaptcha_loaded) {
window.__recaptcha_loaded = true;
var script = document.createElement('script');
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js?render=' + reCaptchaSiteKey);
document.head.appendChild(script);
}
}).fail(function () {
console.warn('Could not load reCaptcha site key from /api/contact');
});
}
function getRecaptchaWebKey() {
return $.get('/api/captcha').done(function (res) {
reCaptchaSiteKey = res;
if (reCaptchaSiteKey && !window.__recaptcha_loaded) {
window.__recaptcha_loaded = true;
var script = document.createElement('script');
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js?render=' + reCaptchaSiteKey);
document.head.appendChild(script);
}
}).fail(function () {
console.warn('Could not load reCaptcha site key from /api/captcha');
});
}
function getGoogleTagManagerId() {
return $.get('/api/google/tagmanager').done(function (res) {