forked from hawkhai/hawkhai.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht.htm
43 lines (39 loc) · 1.28 KB
/
t.htm
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
---
layout: null
---
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
</head>
<body>
<script src="sitemap.js?{{ "now" | date: "%Y%m%d%H%M" }}">
</script>
<script src="assets/md5.min.js">
// from https://cdnjs.cloudflare.com/ajax/libs/blueimp-md5/2.10.0/js/md5.min.js
</script>
<script type="text/javascript">
var shortPrex = "{{ '/t.htm?' | prepend: site.baseurl | prepend: site.urlx }}";
var shortSeed = "{{ page.url | replace:'index.html','' }}";
var query = window.location.search.substring(1);
console.log(baseurl);
console.log(query);
document.write("<pre>");
for (let i = 0; i < pagelist.length; i++) {
var value = pagelist[i];
var hash = md5(value).substr(0, 8);
var urlx = baseurl + value;
console.log(hash + " " + urlx);
if (query == hash) {
console.log("target -> " + hash + " " + urlx);
window.location.href = urlx;
}
var shortx = shortPrex + hash;
document.write("<a href=\"" +shortx+ "\" target=\"_blank\">" + hash + "</a>");
document.write(" -> ");
document.write("<a href=\"" +urlx+ "\" target=\"_blank\">" + urlx + "</a><br/>");
}
document.write("</pre>");
</script>
</body></html>