From 630f755f3611a8cce8ff869ebb7d7f5ceec109dd Mon Sep 17 00:00:00 2001 From: Maingron Date: Sun, 12 Sep 2021 17:34:47 +0200 Subject: [PATCH] Comment Lang handling --- js/scripts.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/scripts.js b/js/scripts.js index 55276d7..84b627e 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -24,6 +24,7 @@ for(let myTemplate of templates) { myTemplate.setAttribute("description", ""); // Fallback if no description is set so we dont get an ugly "null" } + // Lang handling: if(myTemplate.getAttribute("description").indexOf("lang.") > -1) { // Take String from langfile but only if expected myTemplate.setAttribute("description",lang[myTemplate.getAttribute("description").replace("lang.","")]); } @@ -31,7 +32,6 @@ for(let myTemplate of templates) { - for (let myClock1 of config.clock1) { // For every block in config of clock1 spawnBlock(myClock1); } @@ -223,15 +223,13 @@ if(config.clock1.length == 0) { // init - - if(config.edit == true) { var summonEditScript = document.createElement("script"); summonEditScript.src = "js/edit.js"; // Relative to .html file, which uses "js/scripts.js" document.head.appendChild(summonEditScript); } - +// Lang handling: for(myTag of document.getElementsByTagName("lang")) { myTag.innerHTML = lang[myTag.innerHTML] } \ No newline at end of file