-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
56 lines (44 loc) · 1.9 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
<html>
<head>
<title>Columnate</title>
<style type="text/css">
body {
font-family: sans-serif;
font-size: large;
margin: 30px;
}
.ready {
border: 1px solid blue;
padding: 6px;
border-radius: 6px;
background: #eef;
}
</style>
<script type="text/javascript" src="uglifyjs.js"></script>
<script type="text/javascript" src="columnate.js"></script>
<script>
function CreateLink() {
// cribbed from bookmarkletify
var toplevel_ast = UglifyJS.parse(Columnate.toString() + "Columnate();");
toplevel_ast.figure_out_scope();
var compressor = UglifyJS.Compressor();
var compressed_ast = toplevel_ast.transform(compressor);
compressed_ast.figure_out_scope();
var url = "javascript: (function () {" + compressed_ast.print_to_string() + "}())";
document.getElementById("bookmarkletLink").href = url;
document.getElementById("bookmarkletLink").className = "ready";
};
function ClickHelp() {
alert("Drag this link to your bookmark bar.");
return false;
};
</script>
</head>
<body onload="CreateLink();">
<h1>Columnate</h1>
<p>Drag this link to your bookmarks bar to install:</p>
<p><strong><a href="#" id="bookmarkletLink" onclick="return ClickHelp();" title="Drag this link to your bookmark bar.">Columnate</a></strong></p>
<p>Now find a web page with a long article. Click the <strong>Columnate</strong> bookmarklet to reformat the page free of distractions. The article will be formatted in narrow columns like a newspaper.</p>
<p>Visit the <a href="https://github.com/anoved/Columnate">Columnate project page</a> for more information or to report <a href="https://github.com/anoved/Columnate/issues">issues</a>.</p>
</body>
</html>