From 0889034f67f8d8cadc98dcbefcd7021b42a00408 Mon Sep 17 00:00:00 2001 From: neptune Date: Mon, 21 Feb 2022 18:59:05 -0300 Subject: Agregados archivos faltantes --- static/js/home.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'static/js') diff --git a/static/js/home.js b/static/js/home.js index c8a2921..f670ce1 100644 --- a/static/js/home.js +++ b/static/js/home.js @@ -29,6 +29,7 @@ function get_active_stylesheet() { } function check_news() { + console.log("check_news"); var last_t = opcs.last; var items = document.getElementsByClassName("ni"); var dates = document.getElementsByClassName("ni-d"); @@ -186,6 +187,7 @@ function parse() { } document.addEventListener("DOMContentLoaded", function() { + console.log("1"); window.parent.document.title = document.getElementsByTagName( "title" )[0].textContent; @@ -197,25 +199,30 @@ document.addEventListener("DOMContentLoaded", function() { parse(); } //set_stylesheet(opcs.style); - - var css = document.getElementById("change_style").getElementsByTagName("a"); - for (var j = 0; j < css.length; j++) { - css[j].addEventListener("click", function(e) { - e.preventDefault(); - set_stylesheet(this.textContent); - }); - } + console.log("2"); + + //var css = document.getElementById("change_style").getElementsByTagName("a"); + //for (var j = 0; j < css.length; j++) { + // css[j].addEventListener("click", function(e) { + // e.preventDefault(); + // set_stylesheet(this.textContent); + // }); + //} + console.log("2a"); document.getElementById("autorefresh").addEventListener("click", function(e) { opcs.auto = !opcs.auto; autoRefresh(); parse(); }); + console.log("2b"); document.getElementById("autosound").addEventListener("click", function(e) { opcs.sound = !opcs.sound; parse(); }); + console.log("3"); check_news(); + console.log("4"); chk = document.getElementById("autorefresh"); chk_snd = document.getElementById("autosound"); if (opcs.auto) { @@ -224,4 +231,5 @@ document.addEventListener("DOMContentLoaded", function() { } else chk.checked = false; if (opcs.sound) chk_snd.checked = true; else chk_snd.checked = false; + console.log("5"); }); -- cgit v1.2.1-18-gbd029