From eab8bd516396f1e8cc0a9233ce2b33b234eb41a2 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 11 Apr 2019 03:22:33 -0400 Subject: Diseño responsivo: Lista de boards se convierte en menú desplegable --- static/js/shobon.js | 46 ++++++++++++++++++++++++++++------------------ static/js/weabot.js | 17 +++++++++++++++++ static/js/weabotxt.js | 17 +++++++++++++++++ 3 files changed, 62 insertions(+), 18 deletions(-) (limited to 'static/js') diff --git a/static/js/shobon.js b/static/js/shobon.js index 5c65e94..e34ee98 100644 --- a/static/js/shobon.js +++ b/static/js/shobon.js @@ -5,9 +5,9 @@ var hide_id = new Set(); var shobon_ver = "v0.4+"; function shobon() { - boardName = document.getElementsByName("board")[0].value; - var inThread = document.getElementsByTagName("body")[0].className == "threadpage"; - var newRepliesCounter = 0; + boardName = document.body.dataset.brd; + var where = document.body.className; + var inThread = where == "threadpage"; if(!inThread) { /* Create settings link */ @@ -22,9 +22,12 @@ function shobon() { if(localStorage.getItem("shobon_on") == "false") return; else console.log("Running shobon " + shobon_ver); - - if (localStorage.getItem("shobon_usefilters") != "false") { - loadFilters(); + + var newRepliesCounter = 0; + + // dejar barra superior fija + if(localStorage.getItem("shobon_navbar") == "true") { + fixedNav(); } var shobon_time = localStorage.getItem("shobon_time"); @@ -33,7 +36,22 @@ function shobon() { else if (boardName == "2d") week = ["日", "月", "火", "水", "木", "金", "土"]; else week = ["dom", "lun", "mar", "mie", "jue", "vie", "sab"]; } - + + if(where=="threads") { + if(shobon_time != "false") { + var dt = document.getElementsByClassName("date"); + for (var i=0; i