diff --git a/src/main/resources/templates/overlay.html b/src/main/resources/templates/overlay.html index bedb2a4..631eeff 100644 --- a/src/main/resources/templates/overlay.html +++ b/src/main/resources/templates/overlay.html @@ -61,7 +61,9 @@ document.addEventListener("DOMContentLoaded", async() => { await diceBox.init() + let timeout = 0; evtSource.addEventListener("message", function (event) { + clearInterval(timeout); let data = JSON.parse(event.data); diceBox.onRollComplete = (rollResult) => { let httpRequest = new XMLHttpRequest(); @@ -74,7 +76,7 @@ results: rollResult, } )) if ({clearAfter} > 0) { - setTimeout(() => diceBox.clear(), {clearAfter} * 1000) + timeout = setTimeout(() => diceBox.clear(), {clearAfter} * 1000) } } diff --git a/src/main/resources/templates/pub/index.html b/src/main/resources/templates/pub/index.html index 71cd0ec..34f4b94 100644 --- a/src/main/resources/templates/pub/index.html +++ b/src/main/resources/templates/pub/index.html @@ -13,7 +13,6 @@ .collapsible { background-color: #333333; color: black; - cursor: pointer; margin-top: 10px; padding: 18px; width: 100%; @@ -39,6 +38,14 @@ background: #333333; color: #fff } + + button:hover { + background: #444444; + } + button:active { + background: #222222; + } + input { margin: 10px; } @@ -106,6 +113,11 @@ color: #000 } + + .overlayButton:hover { + background: transparent; + } + .tooltip { position: fixed; border-radius: 0.5rem; @@ -133,10 +145,10 @@
Example Commands: "1d6", "2d8 1d100", "1d4 and 1d6", "2d20 & 1d2, "5d6+10"
- -Only open Overlay once, unless you want multiple results
Query Params you can Change: