primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,31 @@
/**
* @package Joomla.JavaScript
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
((window, document) => {
window.JoomlainitReCaptchaInvisible = () => {
const optionKeys = ['sitekey', 'badge', 'size', 'tabindex', 'callback', 'expired-callback', 'error-callback'];
document.querySelectorAll('.g-recaptcha').forEach(element => {
let options = {};
if (element.dataset) {
options = element.dataset;
} else {
optionKeys.forEach(key => {
const optionKeyFq = `data-${optionKeys[key]}`;
if (element.hasAttribute(optionKeyFq)) {
options[optionKeys[key]] = element.getAttribute(optionKeyFq);
}
});
}
// Set the widget id of the recaptcha item
element.setAttribute('data-recaptcha-widget-id', window.grecaptcha.render(element, options));
// Execute the invisible reCAPTCHA
window.grecaptcha.execute(element.getAttribute('data-recaptcha-widget-id'));
});
};
})(window, document);

View File

@ -0,0 +1,5 @@
/**
* @package Joomla.JavaScript
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/((a,o)=>{a.JoomlainitReCaptchaInvisible=()=>{const c=["sitekey","badge","size","tabindex","callback","expired-callback","error-callback"];o.querySelectorAll(".g-recaptcha").forEach(t=>{let e={};t.dataset?e=t.dataset:c.forEach(i=>{const r=`data-${c[i]}`;t.hasAttribute(r)&&(e[c[i]]=t.getAttribute(r))}),t.setAttribute("data-recaptcha-widget-id",a.grecaptcha.render(t,e)),a.grecaptcha.execute(t.getAttribute("data-recaptcha-widget-id"))})}})(window,document);