Merge pull request #110 from mollthecoder/patch-9

Fix tooltip.js
This commit is contained in:
slweeb 2023-07-13 21:04:45 -04:00 committed by GitHub
commit 6734882ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 12 deletions

View File

@ -3,6 +3,7 @@ let tooltipEle;
window.addEventListener("load", ()=>{ window.addEventListener("load", ()=>{
tooltipEle = document.createElement("p"); tooltipEle = document.createElement("p");
tooltipEle.innerHTML = defaultTooltip; tooltipEle.innerHTML = defaultTooltip;
setTimeout(()=>{
document.getElementById("extraInfo").children[1].appendChild(tooltipEle); document.getElementById("extraInfo").children[1].appendChild(tooltipEle);
let buttons = document.getElementsByClassName("elementButton"); let buttons = document.getElementsByClassName("elementButton");
[...buttons].forEach(button=>{ [...buttons].forEach(button=>{
@ -18,4 +19,5 @@ window.addEventListener("load", ()=>{
tooltipEle.innerHTML = defaultTooltip; tooltipEle.innerHTML = defaultTooltip;
}); });
}); });
});
}); });