-
Notifications
You must be signed in to change notification settings - Fork 48
/
index.html
191 lines (171 loc) · 5.5 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>UglifyJS 3: Online JavaScript minifier</title>
<!--
Wrapper created by Dan Wolff (danwolff.se)
This wrapper is in the public domain. Attribution not required but appreciated.
UglifyJS is released under the BSD license, copyright Mihai Bazon.
For more information, see https://github.com/mishoo/UglifyJS2/.
-->
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="style.css">
</head>
<body class="s-input s-info">
<div class="header">
<h1><a id="header-link" href="./">UglifyJS 3: Online JavaScript minifier</a></h1>
</div>
<div class="content">
<div class="col i i-input">
<textarea id="in" rows="15" cols="80" spellcheck="false" tabindex="1" autofocus>// Your code goes here
</textarea>
<div class="tools">
<button class="btn-main pull-right" id="btn-go" tabindex="1">Minify</button>
<button id="btn-options" tabindex="2">Options</button>
<label><input id="cb-as-i-type" type="checkbox" checked> As I type</label>
</div>
</div>
<div class="col i i-options">
<textarea id="options" rows="15" cols="80" spellcheck="false" tabindex="1">// Documentation of the options is available at https://github.com/mishoo/UglifyJS2
{
parse: {
bare_returns : false,
ecma : 8,
expression : false,
filename : null,
html5_comments : true,
shebang : true,
strict : false,
toplevel : null
},
compress: {
arrows : true,
booleans : true,
collapse_vars : true,
comparisons : true,
computed_props : true,
conditionals : true,
dead_code : true,
drop_console : false,
drop_debugger : true,
ecma : 5,
evaluate : true,
expression : false,
global_defs : {},
hoist_funs : false,
hoist_props : true,
hoist_vars : false,
ie8 : false,
if_return : true,
inline : true,
join_vars : true,
keep_classnames : false,
keep_fargs : true,
keep_fnames : false,
keep_infinity : false,
loops : true,
negate_iife : true,
passes : 1,
properties : true,
pure_getters : "strict",
pure_funcs : null,
reduce_funcs : true,
reduce_vars : true,
sequences : true,
side_effects : true,
switches : true,
top_retain : null,
toplevel : false,
typeofs : true,
unsafe : false,
unsafe_arrows : false,
unsafe_comps : false,
unsafe_Function : false,
unsafe_math : false,
unsafe_methods : false,
unsafe_proto : false,
unsafe_regexp : false,
unsafe_undefined : false,
unused : true,
warnings : false
},
mangle: {
eval : false,
ie8 : false,
keep_classnames : false,
keep_fnames : false,
properties : false,
reserved : [],
safari10 : false,
toplevel : false
},
output: {
ascii_only : false,
beautify : false,
bracketize : false,
comments : /@license|@preserve|^!/,
ecma : 5,
ie8 : false,
indent_level : 4,
indent_start : 0,
inline_script : true,
keep_quoted_props: false,
max_line_len : false,
preamble : null,
preserve_line : false,
quote_keys : false,
quote_style : 0,
safari10 : false,
semicolons : true,
shebang : true,
source_map : null,
webkit : false,
width : 80,
wrap_iife : false
},
wrap: false
}
</textarea>
<div class="tools">
<button class="btn-main" id="btn-options-save" tabindex="2">Save</button>
<button id="btn-options-reset" tabindex="2">Use defaults</button>
</div>
</div>
<div class="col i i-info">
<p>
<strong>UglifyJS 3</strong> is an excellent tool to help you minify your JavaScript!
It's a tried and tested tool, used by libraries such as jQuery.</p>
<p>
This is a simple wrapper for the browser around the minifier;
the hard work is done by the Uglify team.
If you need an automated solution, I suggest checking out the
<a href="https://github.com/mishoo/UglifyJS2">source code</a>, intended for Node.JS.</p>
<p>
Do you want to help improve this tool? It's on <a href="https://github.com/Skalman/UglifyJS-online">Github</a>.</p>
<p><small>
This wrapper for the browser was created by <a href="https://danwolff.se/">Dan Wolff</a>.
Version <code id="version">uglify-es 3.3.9</code>.</small></p>
</div>
<div class="col i i-output">
<p>
The minified output (<span id="stats"></span>)</p>
<textarea id="out" spellcheck="false" tabindex="3"></textarea>
</div>
<div class="col i i-error">
<pre id="error"></pre>
</div>
</div>
<script src="uglify/lib/minify.js"></script>
<script src="uglify/lib/utils.js"></script>
<script src="uglify/lib/ast.js"></script>
<script src="uglify/lib/parse.js"></script>
<script src="uglify/lib/transform.js"></script>
<script src="uglify/lib/scope.js"></script>
<script src="uglify/lib/output.js"></script>
<script src="uglify/lib/compress.js"></script>
<script src="uglify/lib/propmangle.js"></script>
<!-- The following aren't needed: sourcemap.js, mozilla-ast.js -->
<script src="script.js"></script>
</body>
</html>