mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-08-27 20:09:57 +00:00
refactor: reorganize js methods
This commit is contained in:
@ -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}`;
|
||||
|
Reference in New Issue
Block a user