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