From ed2841fe5699786d92d20a0978417a698b67d79f Mon Sep 17 00:00:00 2001 From: Mstrdav Date: Mon, 8 Mar 2021 21:31:38 +0100 Subject: [PATCH] yet another fix --- Y/Scripts/yfold.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Y/Scripts/yfold.js b/Y/Scripts/yfold.js index ea2d232..be65a57 100644 --- a/Y/Scripts/yfold.js +++ b/Y/Scripts/yfold.js @@ -103,8 +103,6 @@ window.onload = function() { var snippets = document.getElementsByTagName("code"); for (var snippet of snippets) { if ((snippet.classList.value.includes("page")) || (snippet.classList.value.includes("block"))) { - console.log(snippet); - let img = document.createElement('div'); img.innerHTML = ''; img.addEventListener('click', function() { @@ -135,7 +133,7 @@ window.onload = function() { snippet.appendChild(img) snippet.appendChild(theme) } else { - console.log(snippet.classList); + console.log("nothing here"); } } @@ -147,8 +145,10 @@ window.onload = function() { if (theme == "null" || theme == null || theme == "undefined" || theme == undefined) { // Get default value css_url = "Y/ystyle.css"; + console.log("bidip"); } else { - css_url = theme; + console.log("css url :" + css_url); + css_url = theme.split("../")[theme.split("../").length - 1] } if (window.location.href.split("Y").length >1 ) { @@ -204,7 +204,7 @@ window.onload = function() { css_url = "../" + css_url } } - + changeCSS(css_url, 0) }) }