From 15765cc10d165dbe38f7293e8c3658ab7e5d29a5 Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Thu, 29 Aug 2019 13:51:20 +0200 Subject: [PATCH] Some reorganization of the main javascript file. --- js/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 5c7c80c..fb526ba 100644 --- a/js/main.js +++ b/js/main.js @@ -3,7 +3,6 @@ var light = false; window.onload = function() { - $("#table-of-contents").remove(); reorganize_html(); create_theme_switcher(); roll_elems(); @@ -32,6 +31,9 @@ function roll_elems() { } function reorganize_html() { + // Remove table of contents + $("#table-of-contents").remove(); + // Move the title out of the content div $('#content').before('
'); $('.title').prependTo($('.h1-container')); @@ -92,5 +94,5 @@ function create_theme_switcher() { } function isEmpty(el) { - return !$.trim(el.html()) + return !$.trim(el.html()); }