Add floating mode support
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @package ogre-captcha
|
||||
* @author cleverogre
|
||||
* @copyright 2026 CleverOgre
|
||||
* @license GLP-3.0-or-later
|
||||
* @version 1.1.2
|
||||
* @since 1.1.2
|
||||
*/
|
||||
|
||||
(() => {
|
||||
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);
|
||||
}
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user