Fix tooltip.js
Adds a timeout to make sure everything is loaded before changing the DOM
This commit is contained in:
parent
214d093869
commit
e2588d51af
|
|
@ -3,6 +3,7 @@ let tooltipEle;
|
|||
window.addEventListener("load", ()=>{
|
||||
tooltipEle = document.createElement("p");
|
||||
tooltipEle.innerHTML = defaultTooltip;
|
||||
setTimeout(()=>{
|
||||
document.getElementById("extraInfo").children[1].appendChild(tooltipEle);
|
||||
let buttons = document.getElementsByClassName("elementButton");
|
||||
[...buttons].forEach(button=>{
|
||||
|
|
@ -19,3 +20,4 @@ window.addEventListener("load", ()=>{
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue