aboutsummaryrefslogtreecommitdiff
path: root/static/js/mobile.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/mobile.js')
-rw-r--r--static/js/mobile.js19
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;