NO FUSS NO MUSS

This commit is contained in:
2024-07-04 07:45:38 +02:00
parent 1f7d32ed2c
commit a70623ab46
4 changed files with 1735 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
/* Copyright (C) 2020 David Svantesson
* MIT License
*
*/
function parsePlantumlCodeBlocks(plantumlServer = "http://www.plantuml.com/plantuml", htmlClass = "language-plantuml") {
var codeBlocks = document.getElementsByClassName(htmlClass);
for (var block_i = 0; block_i < codeBlocks.length; block_i++) {
block_string = codeBlocks[block_i].innerText
//UTF8
block_string = unescape(encodeURIComponent(block_string));
codeBlocks[block_i].innerHTML = "<img src=\"" + plantumlServer + "/img/" + encode64(zip_deflate(block_string, 9)) + "\">";
}
}