mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-12 00:06:27 +00:00
to don't duplicate hardcoded strings
This commit is contained in:
parent
ab08b0b35b
commit
ef9a51aec7
@ -4,12 +4,11 @@
|
||||
let jedOptions;
|
||||
try {
|
||||
jedOptions = JSON.parse(document.getElementById('jed-rules-json').innerHTML);
|
||||
if (!jedOptions) throw new Error();
|
||||
} catch (e) {
|
||||
throw new Error('Initialization data is missing');
|
||||
}
|
||||
|
||||
if (!jedOptions) throw new Error('Initialization data is missing');
|
||||
|
||||
const add_validation = () => {
|
||||
// Loop over them and prevent submission
|
||||
[...document.querySelectorAll('.needs-validation')].forEach((form) => {
|
||||
|
Loading…
Reference in New Issue
Block a user