-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
70 lines (61 loc) · 1.76 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en-gb">
<style>
html,
body {
width: 100%;
margin: 0;
}
html {
height: 100%;
}
body {
min-height: 100%;
padding: 20px;
box-sizing: border-box;
}
p {
word-break: break-all;
}
@media (max-width: 500px) {
h1 {
margin-top: 80px;
}
}
.flex {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
</style>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<script>
function toSubmit(e) {
e.preventDefault()
let url = document.getElementsByName('q')[0].value
if (!url.startsWith("https://api.github.com")) {
window.open('/' + url);
}
return false
}
</script>
<title>EndPoint | FastGit UK</title>
</head>
<body class="flex">
<h1>
<img src="https://cdn.jsdelivr.net/gh/FastGitORG/logo@6c1f2ef5ade2006118bb41132d122c446dbe0f74/v2.1/logo.png"
style="height: 1.5em;margin-right: .2em;vertical-align: bottom;">FastGit UK EndPoint</h1>
<form action="./" method="get" target="_blank" class="flex" onsubmit="toSubmit(event)">
<label style="width: fit-content">
<input name="q" type="text" placeholder="GitHub Link"
pattern="^((https|http):\/\/)?(github\.com\/.+?\/.+?\/(?:releases|archive|blob)|((?:raw|gist)\.(?:githubusercontent|github)\.com))\/.|(?:https?:\/\/).+?\.github\.com\/.*+$"
required>
</label>
<input type="submit" value="Go">
</form>
</body>
</html>