Files
ogre-captcha/assets/floating.js
T
2026-06-09 13:04:40 -05:00

22 lines
583 B
JavaScript

/**
* @package ogre-captcha
* @author cleverogre
* @copyright 2026 CleverOgre
* @license GLP-3.0-or-later
* @version 1.2.0
* @since 1.2.0
*/
(() => {
document.addEventListener('DOMContentLoaded', () => {
if (typeof window['CAP_FLOATING_DYNAMIC'] === 'undefined') return;
const element = document.body.querySelector(CAP_FLOATING_DYNAMIC['selector']);
if (element === null) return;
for (const [name, value] of Object.entries(CAP_FLOATING_DYNAMIC['attributes'])) {
element.setAttribute(name, value);
}
});
})();