-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi.html
73 lines (65 loc) · 2.14 KB
/
i.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
<!DOCTYPE html>
<html>
<head>
<title>info for </title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700" rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
body {
font: 2em/1.2em 'Open Sans', Helvetica, Verdana, sans-serif;
color: #444;
background: #F9F9F9;
text-align: center;
}
label {
display: block;
text-transform: uppercase;
font-weight: bold;
}
input,
input[type=submit] {
font: inherit;
}
</style>
</head>
<body>
<script>
window.onload = function() {
document.title = "info for " + window.location.href.split('/')[4];
$.get(window.location.href.replace("/i/", "/s/"), null, setInfo);
$.get(window.location.href.replace("/i/", "/a/"), null, getArchives);
};
function setInfo(resp) {
resp = resp[0];
$("#theurl").text(location.hostname + "/" + resp.uid);
$("#theurl").attr("href", window.location.href.replace("/i", ""));
$("#redirectto").text(resp["url"]);
if (resp["url"].startsWith("http://") || resp["url"].startsWith("https://")) {
url = resp["url"];
} else {
url = "http://" + resp["url"];
}
$("#redirectto").attr("href", url);
$("#added").text(resp["created_at"].split(".")[0]);
$("#archiveorg").text("here");
$("#archiveorg").attr("href", resp["archive"]);
}
function getArchives(resp) {
$.each(resp, function(index, value) {
$("#archives tr:last").after("<tr><td>" + value['saved_at'].split('.')[0] + " </td><td><a href='http://web.archive.org" + value['url'] + "'>here</a></td></tr>");
});
}
</script>
URL: <a id=theurl></a><br />
Redirect to: <a id=redirectto></a><br />
Added: <a id=added></a><br />
Original archive.org link: <a id=archiveorg></a><br />
<br /><br />
<center>
Other archives (created each time shortened URL is created to this destination):
<table id="archives">
<tr><td>Archived at</td> <td>Link</td></tr>
</table>
</center>
</body>
</html>