From 6abfc7494d0566aba5318bcfc2b4784727982a42 Mon Sep 17 00:00:00 2001 From: Choom Date: Mon, 16 Jan 2023 14:28:35 -0300 Subject: Fix css mobile --- static/js/weabot.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'static/js') diff --git a/static/js/weabot.js b/static/js/weabot.js index 04ac483..693d138 100644 --- a/static/js/weabot.js +++ b/static/js/weabot.js @@ -146,10 +146,12 @@ function filePreview(e) { prev.removeAttribute("style"); var fname = file.name.length < 20 ? file.name : file.name.substr(0, 19) + "…"; - if (file.type.startsWith("image")) + if (file.type.startsWith("image")) { prev.insertAdjacentHTML("beforeend", - ' ' + fname); - else prev.insertAdjacentHTML("beforeend", fname); + ' ' + fname); + } else { + prev.insertAdjacentHTML("beforeend", fname); + } prev.appendChild(document.createTextNode(" [")); var btn = document.createElement("a"); btn.href = "#"; @@ -336,12 +338,6 @@ document.addEventListener("DOMContentLoaded", function(e) { this.innerText = (this.innerText == "Pequeño") ? "Grande" : "Pequeño"; }); - document.getElementById("cat-hide").addEventListener("click", function(e) { - e.preventDefault(); - cat.classList.toggle("notxt"); - this.innerText = (this.innerText == "Ocultar") ? "Mostrar" : "Ocultar"; - }); - document.getElementById("cat-srch").addEventListener("keyup", catSearch); document.getElementById("hid-num").addEventListener("click", function(e) { -- cgit v1.2.1-18-gbd029