diff --git a/src/web/app/js/script.js b/src/web/app/js/script.js index 6ed169c..0c3727a 100644 --- a/src/web/app/js/script.js +++ b/src/web/app/js/script.js @@ -5,7 +5,7 @@ let json = { $('input').change((e) => { json[e.currentTarget.id] = e.currentTarget.value; - document.getElementById('json').innerText = JSON.stringify(json); + document.getElementById('json').innerHTML = hljs.highlight(JSON.stringify(json), { language: 'json' }).value; }) $('button[id=addRole]').click((e) => { @@ -32,12 +32,12 @@ $('button[id=addRole]').click((e) => { emoji: result.value[2] || null }) - document.getElementById('json').innerText = JSON.stringify(json); + document.getElementById('json').innerHTML = hljs.highlight(JSON.stringify(json), { language: 'json' }).value; } else Swal.fire('Missing parameters') }).catch(swal.noop) }) $(window).on('load', () => { $('input').toArray().forEach((i) => i.value = ''); - document.getElementById('json').innerText = JSON.stringify(json); + document.getElementById('json').innerHTML = hljs.highlight(JSON.stringify(json), { language: 'json' }).value; }) \ No newline at end of file diff --git a/src/web/index.html b/src/web/index.html index ea88a77..2270047 100644 --- a/src/web/index.html +++ b/src/web/index.html @@ -1,38 +1,40 @@ - + - - - + + + Roles Bot - - - - - - - - - - - - + + + + + + + + + + + + + + + -
-
+
+

Generate

-
- +
+
-

+
- - - + + \ No newline at end of file