-
Notifications
You must be signed in to change notification settings - Fork 13
/
JScrewIt.html
114 lines (87 loc) · 3.7 KB
/
JScrewIt.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
113
114
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<link rel='apple-touch-icon' href='ui/screw.svg'>
<link rel='author' href='https://github.com/fasttime'>
<link rel='icon' href='ui/favicon.ico'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='description' content='Write any JavaScript with six characters: ! ( ) + [ ]'>
<meta name='viewport' content='user-scalable=no, width=device-width'>
<script src='lib/jscrewit.min.js'></script>
<script src='ui/ui.js'></script>
<style>
* { box-sizing: border-box; }
.actions { display: block; margin: .25em 0 0; position: relative; }
.frame
{
background: #e0e0e0;
border-radius: .4em;
display: block;
margin: .75em 0;
padding: .4em;
}
.frame>:first-child { cursor: default; font-weight: bold; margin-bottom: .25em; }
.frame>span:first-child { display: inline-block; }
:focus.focusable, :focus>.focusable { box-shadow: 0 0 2px 2px rgba(0, 127, 255, .75); }
#compMenu { width: 15em; }
#controls>:not(:last-child) { margin-right: 1em; }
#outputArea { line-break: anywhere; white-space: pre; word-break: break-all; }
/* Overwrite the white-space property in most browsers except Internet Explorer. */
@supports (white-space: pre-wrap) { #outputArea { white-space: pre-wrap; } }
[tabindex] { outline: none; }
body { background: white; color: black; font-family: Arial, sans-serif; margin: 5px; }
body, select { font-size: 13.5pt; }
main { display: block; margin: 0 auto; max-width: 720px; text-align: justify; }
main header { height: 100px; margin-top: 10px; position: relative; width: 100%; }
main h1 { font-size: 2em; font-weight: normal; left: 115px; position: absolute; top: 40px; }
main img { background: blue; }
main textarea { display: block; font: 12pt monospace; resize: vertical; width: 100%; }
main>div { display: none; }
</style>
<title>JScrewIt – Write any JavaScript with six characters: ! ( ) + [ ]</title>
<body>
<main>
<header>
<h1>JScrewIt</h1>
<img alt src='ui/screw.svg' width='100' height='100'>
</header>
<p>JScrewIt converts plain JavaScript into JSFuck code, which consists of only six different
characters: <code>!</code> <code>(</code> <code>)</code> <code>+</code> <code>[</code>
<code>]</code>
<div>
<p>Use the form below to encode your script. To encode a number or plain string, type it in
as you would in JavaScript, e.g. <kbd>6.6743e-11</kbd> or <kbd>"Hello, World!"</kbd>.
<div>
<label class='frame'>
<span>Input</span>
<textarea id='inputArea' rows='3' spellcheck='false'>alert(1)</textarea>
</label>
<div>
<div id='controls'>
<label>Compatibility:
<select id='compMenu'>
<option value='DEFAULT'>All supported environments (maximum
compatibility)
<option value='BROWSER'>All supported browsers
<option value='COMPACT'>All new browsers (Chrome, Edge, Firefox, Safari
and Opera)
<option value='AUTO'>Only this browser
<option value=''>Custom…
</select>
</label>
</div>
</div>
<label class='frame'>
<span>Output</span>
<textarea id='outputArea' rows='10' spellcheck='false'></textarea>
<span class='actions'>
<span id='stats'>…</span>
</span>
</label>
</div>
</div>
<noscript>
<p>You must enable JavaScript to use JScrewIt.
</noscript>
</main>