primo commit
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
@charset "UTF-8";
|
||||
.grecaptcha-badge {
|
||||
z-index: 999999;
|
||||
}
|
||||
1
media/plg_captcha_recaptcha_invisible/css/recaptcha_invisible.min.css
vendored
Normal file
1
media/plg_captcha_recaptcha_invisible/css/recaptcha_invisible.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
@charset "UTF-8";.grecaptcha-badge{z-index:999999}
|
||||
Binary file not shown.
31
media/plg_captcha_recaptcha_invisible/js/recaptcha.js
Normal file
31
media/plg_captcha_recaptcha_invisible/js/recaptcha.js
Normal 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);
|
||||
5
media/plg_captcha_recaptcha_invisible/js/recaptcha.min.js
vendored
Normal file
5
media/plg_captcha_recaptcha_invisible/js/recaptcha.min.js
vendored
Normal 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);
|
||||
BIN
media/plg_captcha_recaptcha_invisible/js/recaptcha.min.js.gz
Normal file
BIN
media/plg_captcha_recaptcha_invisible/js/recaptcha.min.js.gz
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
.grecaptcha-badge {
|
||||
z-index: 999999;
|
||||
}
|
||||
Reference in New Issue
Block a user