diff options
Diffstat (limited to 'static')
-rw-r--r-- | static/js/autorefresh.js | 2 | ||||
-rw-r--r-- | static/js/weabot.js | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/static/js/autorefresh.js b/static/js/autorefresh.js index b09758c..31cecbf 100644 --- a/static/js/autorefresh.js +++ b/static/js/autorefresh.js @@ -58,7 +58,7 @@ function updateThread(posts, total_replies, serverTime) { if (post.IS_DELETED == 1) div.innerHTML = '<h4 class="deleted">' + num + ' : Mensaje eliminado por el usuario.</h4>'; else if (post.IS_DELETED == 2) div.innerHTML = '<h4 class="deleted">' + num + ' : Mensaje eliminado por miembro del staff.</h4>'; else - div.innerHTML = '<h4>' + num + ' : ' + s_name + ' : <span class="date" data-unix="' + post.timestamp + '">' + post.timestamp_formatted + '</span> <span class="del"><a href="/cgi/report/' + board + '/' + post.id + '/' + num + '">rep</a> <a href="#">del</a></span></h4>' + s_img + '<div class="msg">' + post.message + '</div>'; + div.innerHTML = '<h4><a class="num" href="#">' + num + '</a> : ' + s_name + ' : <span class="date" data-unix="' + post.timestamp + '">' + post.timestamp_formatted + '</span> <span class="del"><a href="/cgi/report/' + board + '/' + post.id + '/' + num + '">rep</a> <a href="#">del</a></span></h4>' + s_img + '<div class="msg">' + post.message + '</div>'; } else { if (post.file) { if (post.image_width != 0) { diff --git a/static/js/weabot.js b/static/js/weabot.js index 0adc2e1..da0ba83 100644 --- a/static/js/weabot.js +++ b/static/js/weabot.js @@ -365,6 +365,8 @@ document.addEventListener("DOMContentLoaded", function(e) { checkhighlight(); if (localStorage.hasOwnProperty("weabot")) weabot = JSON.parse(localStorage.getItem("weabot")); else weabot = {"name":null,"email":null,"password":null}; + + board = document.getElementsByName("board")[0].value; if(localStorage.hasOwnProperty("hiddenthreads")) { hiddenthreads = localStorage.getItem("hiddenthreads").split("!"); @@ -391,7 +393,7 @@ document.addEventListener("DOMContentLoaded", function(e) { var dts = document.getElementsByClassName("date"); if (dts[0].dataset.unix) { week = ["dom", "lun", "mar", "mie", "jue", "vie", "sab"]; - if (document.getElementsByName("board")[0].value == "2d") week = ["日", "月", "火", "水", "木", "金", "土"]; + if (board == "2d") week = ["日", "月", "火", "水", "木", "金", "土"]; for(var d=0;d<dts.length;d++) { dts[d].addEventListener("mouseover", function(e) { this.title = "Hace " + timeAgo(this.dataset.unix); }); if (dts[d].innerText.includes("ID:")) var id = dts[d].innerText.split(" ")[1]; @@ -423,8 +425,8 @@ document.addEventListener("DOMContentLoaded", function(e) { if (sss[i].innerText == localStorage.getItem(style_cookie)) sss[i].id = "cur_stl"; } - if (document.getElementById(document.getElementsByName("board")[0].value)) - document.getElementById(document.getElementsByName("board")[0].value).className = "cur_brd"; + if (document.getElementById(board)) + document.getElementById(board).className = "cur_brd"; if (document.getElementById("postform")) { setInputs("postform"); |