forked from Skalman/UglifyJS-online
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
126 lines (109 loc) · 3.97 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
<!DOCTYPE html>
<html manifest="uglifyjs-online.appcache">
<head>
<meta charset="utf-8">
<title>UglifyJS: 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/.
-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>UglifyJS: Online JavaScript minifier</h1>
<div id="out-stats" class="invisible">The minified output (<span id="stats"></span>)</div>
<div class="col">
<div class="in-container">
<textarea id="in" rows="15" cols="80" spellcheck="false" tabindex="1" autofocus>
// Your code goes here
</textarea>
<textarea class="hidden" id="options" rows="15" cols="80" spellcheck="false" tabindex="1">
// Documentation of the options is available at https://github.com/mishoo/UglifyJS2
{
parse: {
strict: false
},
compress: {
sequences : true,
properties : true,
dead_code : true,
drop_debugger : true,
unsafe : true,
unsafe_comps : true,
conditionals : true,
comparisons : true,
evaluate : true,
booleans : true,
loops : true,
unused : true,
hoist_funs : true,
hoist_vars : false,
if_return : true,
join_vars : true,
cascade : true,
side_effects : true,
negate_iife : true,
screw_ie8 : false,
warnings : true,
global_defs : {}
},
output: {
indent_start : 0,
indent_level : 4,
quote_keys : false,
space_colon : true,
ascii_only : false,
inline_script : true,
width : 80,
max_line_len : 32000,
beautify : false,
source_map : null,
bracketize : false,
semicolons : true,
comments : /@license|@preserve|^!/,
preserve_line : false,
screw_ie8 : false
}
}
</textarea>
<button id="options-btn" tabindex="2">Options</button>
<button class="hidden" id="options-reset" tabindex="2">Restore defaults</button>
<span id="options-auto-wrapper"><input type="checkbox" class="hidden" id="options-auto" tabindex="2" checked><label for="options-auto" id="options-auto-label" class="hidden">Auto-minify on type</label></span>
<button id="go" tabindex="1">Minify</button>
</div><!-- .in-container -->
</div><!-- .col -->
<div class="col">
<div id="info">
<p><strong>UglifyJS 2</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 <a href="http://lisperator.net/" target="_blank">Mihai Bazon</a>.
If you need an automated solution, I suggest checking out the
<a href="https://github.com/mishoo/UglifyJS2" target="_blank">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/Rikk/UglifyJS-online" target="_blank">Github</a>.</p>
<script src="print-version.js"></script>
<p> </p>
<p><small>This wrapper for the browser was created by <a href="http://danwolff.se/" target="_blank">Dan Wolff</a>.</small></p>
</div>
<div id="out-container" class="hidden">
<textarea id="out" spellcheck="false" tabindex="3"></textarea>
</div>
<div id="error-container" class="hidden">
<pre id="error"></pre>
</div>
</div>
<script src="uglify/lib/utils.js"></script>
<script src="uglify-mod/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="script.js"></script>
</body>
</html>