diff options
author | Michele Calgaro <[email protected]> | 2024-09-18 14:21:27 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-09-18 14:21:27 +0900 |
commit | 8d6255b84d9fb6a585d010119f289baff0794df9 (patch) | |
tree | 5e2a9bb3ea6f85217a9e01cee5634dca5170ca50 /indenters/examples/example.js | |
parent | 3db895919a4cd36972dd5241f480a68fe0f4eb4d (diff) | |
download | universal-indent-gui-tqt-8d6255b84d9fb6a585d010119f289baff0794df9.tar.gz universal-indent-gui-tqt-8d6255b84d9fb6a585d010119f289baff0794df9.zip |
Added indenter examples
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'indenters/examples/example.js')
-rwxr-xr-x | indenters/examples/example.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indenters/examples/example.js b/indenters/examples/example.js new file mode 100755 index 0000000..a807cae --- /dev/null +++ b/indenters/examples/example.js @@ -0,0 +1,12 @@ +function decode() { +var jsdecoder = new JsDecoder();var jscolorizer = new JsColorizer();var code; +jsdecoder.s = document.getElementById("a1").value; +code = jsdecoder.decode(); + +if (document.all) { document.getElementById("a2").innerText = code; } +else { + code = code.replace(/&/g, "&"); code = code.replace(/</g, "<"); + code = code.replace(/>/g, ">"); jscolorizer.s = code; + code = jscolorizer.colorize(); document.getElementById("a2").innerHTML = code; +} +}
\ No newline at end of file |