-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
201 lines (181 loc) · 6.27 KB
/
index.html
File metadata and controls
201 lines (181 loc) · 6.27 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-100846085-1', 'auto');
ga('send', 'pageview');
</script>
<style>
html, body {
height: 100%;
}
* {
margin: 0;
padding: 0;
}
main {
position: absolute;
padding: 12px;
left: calc(50vw - 250px);
top: calc(50vh - 100px);
width: fit-content;
color: slategrey;
font-size: 1.2rem;
}
input {
background: none;
border: none;
border-bottom: 1px solid slategrey;
font-size: 1.2rem;
outline: none;
color: slategray;
}
input:focus {
border-bottom-width: 2px;
}
h3 {
display: inline-block;
}
button {
position: relative;
background-color: slategrey;
color: white;
border: none;
padding: 4px 12px;
margin-left: 32px;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
outline: none;
cursor: pointer;
}
button:hover {
filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
}
button::before {
position: absolute;
content: "";
left: -15px;
top: 0;
bottom: 0;
width: 15px;
background-image: linear-gradient(to bottom right, transparent 50%, slategrey 50%);
}
button::after {
position: absolute;
content: "";
right: -15px;
top: 0;
bottom: 0;
width: 15px;
background-image: linear-gradient(to bottom right, slategrey 50%, transparent 50%);
}
#github {
position: fixed;
right: -200px;
top: -55px;
/*background: black;*/
/*color: white;*/
font-size: 15px;
line-height: 1.4;
padding: 4px 20px;
width: 300px;
transform-origin: 40px 10px;
transform: rotate(45deg);
border: 1px solid black;
cursor: pointer;
}
#github > svg {
height: 21px;
margin-left: 85px;
}
#github > span {
margin-left: 12px;
vertical-align: top
}
section {
margin: 12px;
}
</style>
<title>github rss</title>
</head>
<body>
<main>
<section>
<h3 class="tip">Enter issues's url:</h3>
<input id="url_input" type="text">
<button id="rss">RSS</button>
</section>
</main>
<div id="github">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;" xml:space="preserve">
<g>
<g>
<g>
<path style="fill:#030104;" d="M9.435,7.973c0.269,0,0.492,0.133,0.686,0.396c0.192,0.265,0.294,0.588,0.294,0.975 c0,0.385-0.102,0.711-0.294,0.973c-0.193,0.265-0.417,0.396-0.686,0.396c-0.278,0-0.522-0.131-0.715-0.396 c-0.192-0.262-0.294-0.588-0.294-0.973c0-0.387,0.102-0.71,0.294-0.975C8.912,8.105,9.156,7.973,9.435,7.973 M12.875,4.414 C13.621,5.225,14,6.209,14,7.367c0,0.748-0.086,1.423-0.259,2.023c-0.175,0.597-0.394,1.084-0.654,1.459 c-0.264,0.376-0.588,0.705-0.974,0.989c-0.386,0.286-0.741,0.492-1.065,0.623c-0.325,0.132-0.695,0.233-1.111,0.306 c-0.417,0.071-0.726,0.111-0.943,0.123c-0.213,0.009-0.438,0.014-0.685,0.014c-0.055,0-0.243,0.004-0.547,0.015 C7.461,12.932,7.202,12.935,7,12.935s-0.461-0.003-0.762-0.016c-0.304-0.011-0.492-0.015-0.547-0.015 c-0.246,0-0.472-0.005-0.685-0.014c-0.218-0.012-0.526-0.052-0.943-0.123c-0.423-0.072-0.786-0.174-1.111-0.306 c-0.324-0.131-0.68-0.337-1.064-0.623c-0.387-0.284-0.711-0.613-0.975-0.989C0.652,10.474,0.434,9.987,0.259,9.39 C0.086,8.79,0,8.115,0,7.367c0-1.158,0.379-2.143,1.125-2.953C1.043,4.373,1.04,3.967,1.117,3.197 C1.18,2.426,1.344,1.715,1.612,1.065c0.934,0.099,2.09,0.629,3.471,1.581C5.549,2.527,6.184,2.463,7,2.463 c0.852,0,1.491,0.064,1.918,0.184c0.629-0.425,1.23-0.771,1.805-1.034c0.584-0.261,1.005-0.416,1.269-0.457l0.396-0.09 c0.27,0.649,0.434,1.36,0.496,2.132C12.96,3.967,12.957,4.373,12.875,4.414 M7.03,12.234c1.688,0,2.954-0.202,3.821-0.607 c0.855-0.404,1.292-1.238,1.292-2.496c0-0.73-0.273-1.34-0.822-1.828c-0.278-0.263-0.613-0.425-0.989-0.486 c-0.375-0.061-0.949-0.061-1.72,0c-0.769,0.062-1.298,0.09-1.582,0.09c-0.385,0-0.8-0.018-1.319-0.059 c-0.52-0.04-0.928-0.065-1.223-0.078C4.194,6.761,3.879,6.797,3.53,6.878C3.185,6.96,2.901,7.102,2.677,7.303 c-0.521,0.469-0.79,1.077-0.79,1.828c0,1.258,0.426,2.092,1.28,2.496c0.85,0.405,2.113,0.607,3.802,0.607H7.03 M4.596,7.973 c0.268,0,0.492,0.133,0.685,0.396c0.192,0.265,0.294,0.588,0.294,0.975c0,0.385-0.102,0.711-0.294,0.973 c-0.192,0.265-0.417,0.396-0.685,0.396c-0.279,0-0.522-0.131-0.716-0.396c-0.192-0.262-0.294-0.588-0.294-0.973 c0-0.387,0.102-0.71,0.294-0.975C4.073,8.105,4.316,7.973,4.596,7.973"/>
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg><span>Github</span></div>
<script>
var url_input = document.querySelector('#url_input');
var rssButton = document.querySelector('#rss');
var github = document.querySelector('#github');
rssButton.addEventListener('click', function(e) {
var url = url_input.value;
if (/^https:\/\/github\.com\/([\w\-]+)\/([\w\-\.]+)\/issues\/?$/.test(url)) {
if (url.lastIndexOf('/') === url.length - 1) {
url = url.substring(0, url.length - 1);
}
var encodedUrl = encodeURIComponent(url);
location.href = '/' + encodedUrl + '/feed';
} else if (/^https:\/\/github\.com\/([\w\-]+)\/([\w\-\.]+)\/?$/.test(url)) {
if (url.lastIndexOf('/') === url.length - 1) {
url = url.substring(0, url.length - 1);
}
var encodedUrl = encodeURIComponent(url + '/issues')
location.href = '/' + encodedUrl + '/feed';
} else {
alert('Please enter a valid url');
}
})
github.addEventListener('click', function(e) {
location.href = 'https://github.com/mrcodehang/github-issues-rss'
})
</script>
</body>
</html>