-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
49 lines (38 loc) · 1.62 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
<!doctype html>
<html>
<head>
<title>Needs Moar JPEG</title>
<meta charset="ISO-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#targetUrl").focus();
$("#jpgForm").submit(function (e) {
e.preventDefault();
var redir = $("input[type=text]").val(),
host = "http://" + window.location.host + "/";
if (redir) {
window.location = host + redir;
} else {
console.log("no redir: " + redir);
}
});
});
</script>
</head>
<body>
<form id="jpgForm" method="" enctype="multipart/form-data" action="#" target="postFrame">
<label for='targetUrl'>Please enter the URL of an image to compress the crap out of:</label> <br />
<input id='targetUrl' name='targetUrl' type="text" size="70" placeholder="http://example.com/logo.jpg" autofocus />
<input type="submit" value="Go" />
</form>
<iframe name="postFrame" style="display: none;"></iframe>
<a href="https://github.com/psxpaul/moarjpeg">
<img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png">
</a>
</body>
</html>