This commit is contained in:
Nordi98 2025-08-04 20:32:58 +02:00
parent f57a27b8df
commit 4b4bb3b0ab
76 changed files with 6389 additions and 0 deletions

View file

@ -0,0 +1,19 @@
(function () {
const textUI = document.querySelector(".text-ui");
window.addEventListener("message", (evt) => {
const { data } = evt;
if (!data) return false;
if (data.type === "show") {
// If the string contains a key in square brackets (like [E]), then style it differently!
let str = data.text.replaceAll(/\[(.*?)\]/g, "<kbd>$1</kbd>");
textUI.style.left = "20px";
textUI.innerHTML = str;
} else if (data.type === "hide") {
textUI.style.left = "-100%";
}
});
})();