mirror of
https://github.com/xHyroM/roles-bot.git
synced 2024-11-21 16:11:04 +01:00
highlight
This commit is contained in:
parent
8d00dc7041
commit
d1e834ad86
2 changed files with 29 additions and 27 deletions
|
@ -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;
|
||||
})
|
|
@ -1,38 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset='UTF-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
||||
<title>Roles Bot</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" integrity="sha512-c42qTSw/wPZ3/5LBzD+Bw5f7bSF2oxou6wEb+I/lqeaKV5FDIfMvvRp772y4jcJLKuGUOpbJMdg/BTl50fJYAw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<meta name="keywords" content="ReactionRoles, discord, discordbot, discordroles, roles-bot">
|
||||
<meta property="og:site_name" content="Roles Bot">
|
||||
<meta property="og:title" content="Roles Bot">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" content="https://i.imgur.com/MSdTu2M.png">
|
||||
<meta name="author" content="xHyroM">
|
||||
<meta name="theme-color" content=#ead800>
|
||||
<link rel="stylesheet" href="dist/style.css">
|
||||
<link rel="icon" href="assets/logo.ico">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/default.min.css">
|
||||
<script src="https://kit.fontawesome.com/5acf4d9e80.js" crossorigin="anonymous"></script>
|
||||
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css' integrity='sha512-c42qTSw/wPZ3/5LBzD+Bw5f7bSF2oxou6wEb+I/lqeaKV5FDIfMvvRp772y4jcJLKuGUOpbJMdg/BTl50fJYAw==' crossorigin='anonymous' referrerpolicy='no-referrer' />
|
||||
<meta name='keywords' content='ReactionRoles, discord, discordbot, discordroles, roles-bot'>
|
||||
<meta property='og:site_name' content='Roles Bot'>
|
||||
<meta property='og:title' content='Roles Bot'>
|
||||
<meta property='og:description' content=''>
|
||||
<meta property='og:image' content='https://i.imgur.com/MSdTu2M.png'>
|
||||
<meta name='author' content='xHyroM'>
|
||||
<meta name='theme-color' content=#ead800>
|
||||
<link rel='stylesheet' href='dist/style.css'>
|
||||
<link rel='icon' href='assets/logo.ico'>
|
||||
<script src='https://kit.fontawesome.com/5acf4d9e80.js' crossorigin='anonymous'></script>
|
||||
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
|
||||
|
||||
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/default.min.css'>
|
||||
<script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js'></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</head>
|
||||
<body>
|
||||
<section class="flex-container">
|
||||
<div class="container">
|
||||
<section class='flex-container'>
|
||||
<div class='container'>
|
||||
<h1>Generate</h1>
|
||||
<form>
|
||||
<input placeholder="Message" name="message" id="message"/><br> <!--Message-->
|
||||
<input placeholder="Channel Id" name="channel" id="channel"/> <!--Channel Id-->
|
||||
<input placeholder='Message' name='message' id='message'/><br> <!--Message-->
|
||||
<input placeholder='Channel Id' name='channel' id='channel'/> <!--Channel Id-->
|
||||
</form>
|
||||
<button id='addRole'>Add Role</button>
|
||||
<pre><code class="language-json"><p class="code" id='json'></p></code></pre>
|
||||
<pre class='hljs language-json'><code id='json'></code></pre>
|
||||
</div>
|
||||
</section>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<script src="app/js/script.js"></script>
|
||||
<script src='//cdn.jsdelivr.net/npm/sweetalert2@11'></script>
|
||||
<script src='app/js/script.js'></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue