Skip to content

Commit

Permalink
Comment Lang handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Maingron committed Sep 12, 2021
1 parent 5b08e90 commit 630f755
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ 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.","")]);
}
}




for (let myClock1 of config.clock1) { // For every block in config of clock1
spawnBlock(myClock1);
}
Expand Down Expand Up @@ -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]
}

0 comments on commit 630f755

Please sign in to comment.