This repository has been archived by the owner on Jun 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
112 lines (109 loc) · 6.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Discord Message Formatter</title>
<meta name="google-site-verification" content="zZlQqHj_UFRqv-n1Rw1szukskpRuIi_lxmuiTbuwf9o" />
<meta content="Discord Message Formatter" property="og:title" />
<meta content="A website to help you format your Discord messages!" property="og:description" />
<meta content="https://ah07.xyz/discord-formatter" property="og:url" />
<meta content="https://i.imgur.com/8QaFXJU.png" property="og:image" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicons/favicon-16x16.png">
<link rel="manifest" href="/assets/favicons/site.webmanifest">
<link rel="shortcut icon" href="/assets/favicons/favicon.ico">
<link href="https://fonts.cdnfonts.com/css/whitney-2" rel="stylesheet">
<meta name="apple-mobile-web-app-title" content="Discord Message Formatter">
<meta name="application-name" content="Discord Message Formatter">
<meta name="msapplication-TileColor" content="#ff7700">
<meta name="msapplication-config" content="/assets/favicons/browserconfig.xml">
<link rel="stylesheet" href="src/styles.css">
</head>
<body>
<main>
<div class="cool">
<h1><span class="date">Discord</span> Formatter!</h1>
</div>
<article>
<select id="dropdown" onchange="dropdown()" style="font-size: 1em;">
<option value="text">Regular Text</option>
<option value="color">Colored Text</option>
<option value="time">Timestamp</option>
</select>
<button type="button" id="reset" class="resetButton" onclick="resetFn()">Reset</button>
<button type="button" id="copy" class="copyButton" onclick="copyFn()">Copy</button><br><br>
<div>
<textarea placeholder="Your Text Here..." id="textArea" oninput="rmFn()"></textarea>
<input type="datetime-local" step=1 id="datepicker" style="display: none" oninput="main()"><br><br>
<h2>Options</h2>
</div>
<div id="textdiv">
<button type="button" id="bold" onclick="boldFn(textArea.value)" style="font-weight: bolder;">Bold</button> <!-- mfw no bold jetbrains mono :skull: -->
<button type="button" id="ital" onclick="italFn(textArea.value)" style="font-style: italic;">Italic</button>
<button type="button" id="under" onclick="underFn(textArea.value)" style="text-decoration: underline;">Underscore</button>
<button type="button" id="strike" onclick="strikeFn(textArea.value)" style="text-decoration: line-through">Strikethrough</button>
<button type="button" id="spoil" onclick="spoilFn(textArea.value)">Spoiler</button>
<button type="button" id="quote" onclick="quoteFn(textArea.value)">▐ Quote</button>
<button type="button" id="line" onclick="lineFn(textArea.value)">Inline</button>
<button type="button" id="block" onclick="blockFn(textArea.value)">Inline Block</button>
<button type="button" id="slash" onclick="slashFn(textArea.value)">/SlashCommand</button><br><br>
<p style="font-size: 0.9em;">Note: if not ordered properly, some formats might not work (e.g. using spoiler before code block, negating the spoiler)<br><br>Note 2: Slash Command only works on mobile right now, idk what happened</p>
</div>
<div id="colordiv" style="display: none;">
<button type="button" id="red" onclick="redFn(textArea.value)" style="color: #D5322F;">Red</button>
<button type="button" id="orange" onclick="orangeFn(textArea.value)"
style="color: #B7471B;">Orange</button>
<button type="button" id="yellow" onclick="yellowFn(textArea.value)"
style="color: #B18602;">Yellow</button>
<button type="button" id="green" onclick="greenFn(textArea.value)"
style="color: #839701;">Green</button>
<button type="button" id="turq" onclick="turqFn(textArea.value)"
style="color: #2B918A;">Turquoise</button>
<button type="button" id="blue" onclick="blueFn(textArea.value)" style="color: #287AB5;">Blue</button>
<button type="button" id="gray" onclick="grayFn(textArea.value)" style="color: #576D74;">Gray</button>
</div>
<div id="timediv" style="display: none; width: 75%;">
<div style="display: flex; align-items: center; justify-content: space-evenly;">
<div>
<h3>Short Time (t):</h3>
<code id="datet">HH:MM (AM/PM)</code>
<h3>Long Time (T):</h3>
<code id="dateT">HH:MM:SS (AM/PM)</code>
</div>
<div>
<h3>Short Date (d):</h3>
<code id="dated">MM/DD/YYYY</code>
<h3>Long Date (D):</h3>
<code id="dateD">Mo DD, YYYY</code>
</div>
<div>
<h3>Full Date and Time (f):</h3>
<code id="datef">Mo DD, YYYY HH:MM (AM/PM)</code>
<h3>FD&T w/ Day (F):</h3>
<code id="dateF">Day, Mo DD, YYYY HH:MM (AM/PM)</code>
</div>
<div>
<h3>Relative (R):</h3>
<code id="dateR"># (Unit) Ago</code>
</div>
</div><br>
<div>
<h2>Guide</h2>
<img src="https://i.imgur.com/8KsLNop.jpg" width="500px" style="border-radius: 0.6rem" />
</div>
</article>
<hr>
<footer>
<a href="https://github.com/anthonyhuang07/">Copyright (c) 2023 Anthony Huang</a>
</footer>
</main>
<script src="src/scripts/text.js" defer></script>
<script src="src/scripts/index.js" defer></script>
<script src="src/scripts/color.js" defer></script>
<script src="src/scripts/time.js" defer></script>
</body>
</html>