forked from MarseyWorld/MarseyWorld
dedup function
parent
ab83e2e65f
commit
6acb3a159a
|
@ -195,15 +195,7 @@ function bs_trigger(e) {
|
|||
});
|
||||
|
||||
if (typeof update_speed_emoji_modal == 'function') {
|
||||
let forms = e.querySelectorAll("textarea, .allow-emojis");
|
||||
forms.forEach(i => {
|
||||
let pseudo_div = document.createElement("div");
|
||||
pseudo_div.className = "ghostdiv";
|
||||
pseudo_div.style.display = "none";
|
||||
i.after(pseudo_div);
|
||||
i.addEventListener('input', update_speed_emoji_modal, false);
|
||||
i.addEventListener('keydown', speed_carot_navigate, false);
|
||||
});
|
||||
insertGhostDivs(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -511,8 +511,8 @@ function speed_carot_navigate(event)
|
|||
}
|
||||
}
|
||||
|
||||
// Let's get it running now
|
||||
let forms = document.querySelectorAll("textarea, .allow-emojis");
|
||||
function insertGhostDivs(element) {
|
||||
let forms = element.querySelectorAll("textarea, .allow-emojis");
|
||||
forms.forEach(i => {
|
||||
let pseudo_div = document.createElement("div");
|
||||
pseudo_div.className = "ghostdiv";
|
||||
|
@ -521,6 +521,7 @@ forms.forEach(i => {
|
|||
i.addEventListener('input', update_speed_emoji_modal, false);
|
||||
i.addEventListener('keydown', speed_carot_navigate, false);
|
||||
});
|
||||
}
|
||||
|
||||
function loadEmojis(inputTargetIDName)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue