-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (58 loc) · 3.55 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
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="favicon.png"> <!-- https://iconarchive.com/show/origami-colored-pencil-icons-by-double-j-design.html -->
</head>
<body>
<h1>Base64 Direct</h1>
<blockquote>
<p>
Base64 Direct is a utility that decodes base64 text to ASCII text.
<br>
If the base64 text is encoded more than once, it will keep trying,
up to 9 times.
</p>
<p>
The <code>Show!</code> button displays the step-by-step results of
the decoding.<br>
The <code>Go!</code> button sends your browser directly to the
decoded text.
</p>
<p>
If you know your base64 text is a valid URL, put the base64 text
after this site's url to go directly to the base64 URL.<br>
For example:<br>
<code>https://www.google.com</code> in base64 is
<code>aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ</code>.<br>
Paste the base64 after this site's url to go to
<code>https://www.google.com</code>.<br>
Like so: <code><a
href="https://davefriedman.github.io/base64direct/aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ">
https://davefriedman.github.io/base64direct/aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbQ
</a></code>
</p>
</blockquote>
<textarea id="b64box" placeholder="base64 string here" autofocus required></textarea>
<button id="showBtn" value="Show!">Show!</button>
<button id="goBtn" value="Go!">Go!</button>
<p></p>
<div id="showDiv">
</div>
</body>
<footer>
<a href="https://DaveFriedman.github.io">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" style="vertical-align: -0.125em;" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 36 36"><path fill="currentColor" d="M33 19a1 1 0 0 1-.71-.29L18 4.41L3.71 18.71A1 1 0 0 1 2.3 17.3l15-15a1 1 0 0 1 1.41 0l15 15A1 1 0 0 1 33 19Z" class="clr-i-solid clr-i-solid-path-1"/><path fill="currentColor" d="M18 7.79L6 19.83V32a2 2 0 0 0 2 2h7V24h6v10h7a2 2 0 0 0 2-2V19.76Z" class="clr-i-solid clr-i-solid-path-2"/><path fill="none" d="M0 0h36v36H0z"/></svg>
Dave Friedman
</a>
<br>
<a href="https://github.com/DaveFriedman/base64direct">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" style="vertical-align: -0.125em;" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M16 .396c-8.839 0-16 7.167-16 16c0 7.073 4.584 13.068 10.937 15.183c.803.151 1.093-.344 1.093-.772c0-.38-.009-1.385-.015-2.719c-4.453.964-5.391-2.151-5.391-2.151c-.729-1.844-1.781-2.339-1.781-2.339c-1.448-.989.115-.968.115-.968c1.604.109 2.448 1.645 2.448 1.645c1.427 2.448 3.744 1.74 4.661 1.328c.14-1.031.557-1.74 1.011-2.135c-3.552-.401-7.287-1.776-7.287-7.907c0-1.751.62-3.177 1.645-4.297c-.177-.401-.719-2.031.141-4.235c0 0 1.339-.427 4.4 1.641a15.436 15.436 0 0 1 4-.541c1.36.009 2.719.187 4 .541c3.043-2.068 4.381-1.641 4.381-1.641c.859 2.204.317 3.833.161 4.235c1.015 1.12 1.635 2.547 1.635 4.297c0 6.145-3.74 7.5-7.296 7.891c.556.479 1.077 1.464 1.077 2.959c0 2.14-.02 3.864-.02 4.385c0 .416.28.916 1.104.755c6.4-2.093 10.979-8.093 10.979-15.156c0-8.833-7.161-16-16-16z"/></svg>
Source
</a>
</footer>
<script src="base64direct.js"></script>
<script>
document.getElementById("showBtn").addEventListener("click", show);
document.getElementById("goBtn").addEventListener("click", go);
</script>
</html>