Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
zeerd authored Dec 26, 2023
1 parent 598ca11 commit 6799e98
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ setInterval(() => {
}
}, 1000)

setInterval(() => {
const prefix = "https://vultr6.zeerd.com/plantuml.php?uml=";
var elements = document.getElementsByClassName('language-plantuml');
for (var i=0, len=elements.length|0; i<len; i=i+1|0) {
encoded = encodeURI(prefix + elements[i].innerHTML);
encoded = encoded.replace(/#/g, "%23");
// elements[i].innerHTML = "<img alt='DOT sample with plantuml' src='" + encoded + "'>";
elements[i].innerHTML = "<object type='image/svg+xml' style='width:100%;height:100%' data='"
+ encoded + "'></object>";
elements[i].className = "plantuml";
elements[i].outerHTML = elements[i].outerHTML.replace(/code/g,"div");
}
}, 1000)
// setInterval(() => {
// const prefix = "https://vultr6.zeerd.com/plantuml.php?uml=";
// var elements = document.getElementsByClassName('language-plantuml');
// for (var i=0, len=elements.length|0; i<len; i=i+1|0) {
// encoded = encodeURI(prefix + elements[i].innerHTML);
// encoded = encoded.replace(/#/g, "%23");
// // elements[i].innerHTML = "<img alt='DOT sample with plantuml' src='" + encoded + "'>";
// elements[i].innerHTML = "<object type='image/svg+xml' style='width:100%;height:100%' data='"
// + encoded + "'></object>";
// elements[i].className = "plantuml";
// elements[i].outerHTML = elements[i].outerHTML.replace(/code/g,"div");
// }
// }, 1000)

0 comments on commit 6799e98

Please sign in to comment.