refactor: reorganize js methods

This commit is contained in:
2025-07-07 20:33:01 +03:00
parent f2ea76aab9
commit b83df9d2c5
3 changed files with 137 additions and 130 deletions

View File

@ -3,7 +3,9 @@
function createAlert(title, message, clz, action, id) {
id ??= md5(title + message); // MD5 id from the content
if (alertPlaceholder.querySelector(`#alert-${id}`)) return; // check if there are duplicates
if (alertPlaceholder.querySelector(`#alert-${id}`)) {
return; // check if there are duplicates
}
const wrapper = document.createElement("div");
wrapper.id = `alert-${id}`;