mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-15 18:54:47 -04:00
wip
This commit is contained in:
parent
401e9b4548
commit
62a1feb015
32 changed files with 1483 additions and 1435 deletions
|
@ -140,22 +140,8 @@ ${icon}
|
|||
if (isOptionOn("mobile-mode")) {
|
||||
const helpBtn = document.createElement("button");
|
||||
helpBtn.innerText = "?";
|
||||
helpBtn.className = "help";
|
||||
let helpTooltip = document.createElement("div");
|
||||
helpTooltip.textContent = tooltip;
|
||||
helpTooltip.className = "help_button_tooltip";
|
||||
helpBtn.addEventListener("click", (e) => {
|
||||
e.stopPropagation();
|
||||
});
|
||||
helpBtn.addEventListener("touchstart", (e) => {
|
||||
e.stopPropagation();
|
||||
document.body.appendChild(helpTooltip);
|
||||
});
|
||||
helpBtn.addEventListener("touchend", (e) => {
|
||||
document.body.removeChild(helpTooltip);
|
||||
});
|
||||
|
||||
button.appendChild(helpBtn);
|
||||
helpBtn.setAttribute('data-help-content',tooltip);
|
||||
button.appendChild(helpBtn)
|
||||
} else {
|
||||
button.setAttribute("data-tooltip", tooltip);
|
||||
}
|
||||
|
@ -199,3 +185,4 @@ function updateAlertsOpen(delta: number) {
|
|||
}
|
||||
document.body.classList[alertsOpen ? "add" : "remove"]("has-alert-open");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue