-
Notifications
You must be signed in to change notification settings - Fork 5
/
404.html
executable file
·57 lines (52 loc) · 2.46 KB
/
404.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
---
permalink: /404.html
---
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='author' content='Rek Bellum'>
<meta name='description' content='Cartoonist Rek Bell'/>
<meta name='keywords' content='Oquonie, illustration, cartoonist, Markl, Circa, Wiktopher' />
<meta name='license' content='name=BY-NC-SA(4.0), url=https://creativecommons.org/licenses/by-nc-sa/4.0/'/>
<meta name='thumbnail' content='https://kokorobot.ca/media/services/thumbnail.jpg' />
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta name='twitter:card' content='summary'>
<meta name='twitter:title' content='Cartoonist Rek Bellum'>
<meta name='twitter:description' content='Kokorobot is the virtual playground of cartoonist Rek Bellum.'>
<meta name='twitter:image' content='https://kokorobot.ca/media/services/rss.jpg'>
<meta property='og:title' content='Cartoonist Rek Bellum' />
<meta property='og:type' content='article' />
<meta property='og:url' content='http://kokorobot.ca/' />
<meta property='og:image' content='https://kokorobot.ca/media/services/rss.jpg' />
<meta property='og:description' content='Kokorobot is the virtual playground of cartoonist Rek Bellum.' />
<meta property='og:site_name' content='Kokorobot' />
<link rel='alternate' type='application/rss+xml' title='Feed' href='links/rss.xml' />
<link rel='icon' type='image/x-icon' href='media/services/favicon.ico'>
<link rel='icon' type='image/png' href='media/services/rss.jpg'>
<link rel='apple-touch-icon' href='media/services/rss.jpg' />
<title>Kokorobot</title>
</head>
<body>
<p style='max-width: 500px'>Hi there, the page you are looking for does not exist, please <a href='https://github.com/rekkabell/kokorobot/issues/new' target='_blank'>report the broken link</a>, or continue to the <a href='https://kokorobot.ca/site/home.html'>home page</a>.</p>
<script>
'use strict'
const parts = window.location.pathname.split("/")
const target = parts.slice(-1)
const filename = toFilename(target[0])
const filepath = `https://kokorobot.ca/site/${filename}.html`
if(UrlExists(filepath)){
window.location.replace(filepath)
}
function UrlExists(url) {
const http = new XMLHttpRequest()
http.open('HEAD', url, false)
http.send()
return http.status!=404
}
function toFilename(str){
return `${str}`.replace('#','').replace(/[\W_]+/g,"_").toLowerCase().trim()
}
</script>
</body>
</html>