aboutsummaryrefslogtreecommitdiff
path: root/static/js/weabot.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/weabot.js')
-rw-r--r--static/js/weabot.js8
1 files changed, 5 insertions, 3 deletions
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");