aboutsummaryrefslogtreecommitdiff
path: root/static/js/weabot.js
diff options
context:
space:
mode:
authorLibravatar Señor X 2019-03-31 06:35:04 -0300
committerLibravatar Señor X 2019-03-31 06:35:04 -0300
commitdf82b74482a8a4c423320775796d7c34dfedceda (patch)
tree131062cc87d04e27fee45bce1562289bb696ea4a /static/js/weabot.js
parent5c900ca03f0dee646bc40aa0f30aedf259988370 (diff)
downloadweabot-df82b74482a8a4c423320775796d7c34dfedceda.tar.gz
weabot-df82b74482a8a4c423320775796d7c34dfedceda.tar.xz
weabot-df82b74482a8a4c423320775796d7c34dfedceda.zip
Agregando delegación a # y del en BBS
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");