From 1f988f01c7eee932ef7d2fb80de5a2b3792097d3 Mon Sep 17 00:00:00 2001 From: Choom Date: Mon, 16 Jan 2023 05:05:02 -0300 Subject: Divs únicos deben tener id --- static/js/autorefresh.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'static/js/autorefresh.js') diff --git a/static/js/autorefresh.js b/static/js/autorefresh.js index 91ac05c..d804675 100644 --- a/static/js/autorefresh.js +++ b/static/js/autorefresh.js @@ -233,7 +233,6 @@ function updateThread(posts, total_replies, serverTime) { } thread_length = parseInt(total_replies) + 1; - //document.getElementsByClassName("thread")[0].firstChild.children[0].innerHTML = "("+thread_length+")"; new_unread = thread_length - thread_first_length; if (new_unread) document.title = "(" + new_unread + ") " + thread_title; @@ -244,7 +243,7 @@ function notif(title, msg) { var n = new Notification(title, { body: msg }); - setTimeout(n.close.bind(n), 10000); + setTimeout(n.close.bind(n), 5000); } function counter() { @@ -270,7 +269,7 @@ function detectService() { if (thread_length == thread_lastreply) { serviceType = 2; document.getElementById("n").addEventListener("click", checkNew); - var footer = document.getElementsByClassName("lastposts")[0]; + var footer = document.getElementById("lastposts"); var in1 = document.createElement("input"); in1.id = "autorefresh"; in1.setAttribute("type", "checkbox"); @@ -281,7 +280,7 @@ function detectService() { in2.setAttribute("for", "autorefresh"); in2.style.marginRight = "4px"; in2.style.cursor = "pointer"; - in2.textContent = "Auto refresh"; + in2.textContent = "Automático"; var in3 = document.createElement("span"); in3.id = "counter"; in3.style.position = "absolute"; -- cgit v1.2.1-18-gbd029