diff options
author | junk | 2021-03-27 20:20:28 -0300 |
---|---|---|
committer | junk | 2021-03-27 20:53:56 -0300 |
commit | 9b039e42df4eefb7971a2cfa19bce260ab4ef08f (patch) | |
tree | 5ad65f7f0dabaa439745daeae5a7dd374c8a1b03 /static/js/mobile.js | |
parent | 0e86988ba9099072dcd2af5142f8f4e988908e9b (diff) | |
download | weabot-9b039e42df4eefb7971a2cfa19bce260ab4ef08f.tar.gz weabot-9b039e42df4eefb7971a2cfa19bce260ab4ef08f.tar.xz weabot-9b039e42df4eefb7971a2cfa19bce260ab4ef08f.zip |
Arreglando diseño para móviles
Diffstat (limited to 'static/js/mobile.js')
-rw-r--r-- | static/js/mobile.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/static/js/mobile.js b/static/js/mobile.js index 22606b9..36747e8 100644 --- a/static/js/mobile.js +++ b/static/js/mobile.js @@ -90,7 +90,7 @@ function showMenu(e) { e.preventDefault(); if (document.getElementById("mnu-opened")) closeMenu(e); this.id = "mnu-opened"; - var brd = postform.board.value; + var brd = document.body.dataset.brd; var post = this.parentNode.parentNode; if (document.body.className === "txt") { var id = post.id.substr(1); @@ -422,7 +422,7 @@ function counter() { } function detectService() { - if (document.getElementById("thread")) { + if (document.getElementById("thread") && document.getElementById("postform")) { thread_title = document.getElementsByTagName("h1")[0].innerHTML.split(" <span>")[0] + " - " + @@ -444,12 +444,7 @@ function detectService() { ); if (thread_length == thread_lastreply) { serviceType = 1; - document - .getElementById("n2") - .setAttribute( - "style", - "border-top:1px solid #c6c7c8;border-left:1px solid #c6c7c8;display:inline-block;text-align:center;width:50%;" - ); + document.getElementById("n2").setAttribute("style","border-top:1px solid #c6c7c8;border-left:1px solid #c6c7c8;display:inline-block;text-align:center;width:50%;"); return true; } else return false; } else if (document.body.className === "img") { @@ -585,6 +580,14 @@ document.addEventListener("DOMContentLoaded", function(e) { ft[i].appendChild(cln); } } + + var sjis = /( \| /|\ |/ | ̄ ̄|| | ||\| | \|)/; + var msg = document.getElementsByClassName("msg"); + for (var i=0; i<msg.length; i++) { + if (msg[i].textContent.match(sjis)) { + msg[i].classList.add("minisjis"); + } + } } if (!detectService()) return; |