-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.html
252 lines (216 loc) · 6.72 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
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html>
<head>
<style>
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@300&display=swap");
html {
font-family: "Fredoka", "sans-serif";
background-color: #1e88e5;
color: white;
}
button {
font-family: "Fredoka", "sans-serif";
background-color: #64dd17;
color: white;
border-color: white;
display: block;
margin: 0 auto;
font-size: 18px;
}
#copy {
background-color: #512da8;
}
#title {
color: #e53935;
}
#footer {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
#footer a,
#footer img {
margin: 0 15px;
width: 100px;
height: auto;
}
#more_info {
display: hidden;
}
input {
font-family: "Fredoka", "sans-serif";
background-color: #f57f17;
color: white;
border-color: white;
display: block;
margin: 0 auto;
font-size: 20px;
}
h1,
h3,
h4,
h5,
h6 {
text-align: center;
}
iframe {
display: block;
margin: 0 auto;
}
#tip {
color: lightgreen;
}
#condition {
color: #e53935;
text-align: center;
font-size: 18px;
}
#seperator {
text-align: center;
font-size: 30px;
}
#copy_tip {
color: #512da8;
}
#footer a,
#footer img {
display: inline-block;
vertical-align: middle;
}
.fade-in {
opacity: 0;
transition: opacity 0.65s ease-in;
}
.fade-in.active {
opacity: 1;
}
</style>
</head>
<body>
<h1 class="fade-in" id="title"> Norepted <h1>
<h3 class="fade-in"> Paste your youtube link in the orange box. Then press the LAUNCH button. <br> <br>To exit the site, press "0," doing this way will remove Norepted from your history. <br> <br>To hide the tab, press "1."</h3></h3>
<h4 class="fade-in" id="copy_tip"> If you want, press the "COPY" button to copy a link, open it in a new tab.</h4>
<h4 class="fade-in" id="tip"> Tip: Press "Enter" on your keyboard to launch the video faster. </h4>
<br>
<input class="fade-in" id="link"><br>
<button class="fade-in" onclick="fix_link()"> LAUNCH </button>
<br>
<button class="fade-in" id="copy" onclick="copy_link()"> COPY </button>
<h3 class="fade-in"> The video will show down here</h3>
<h5 class="fade-in"> (It might take a few seconds) </h5>
<iframe class="fade-in" id="video" width="650" height="425" frameborder="0" src=" " allowfullscreen> </iframe>
<br>
<div class="fade-in" id="seperator">
<span> -------------------------------------------------- </span>
</div>
<div id="footer" class="fade-in">
<div class="visitor-counter">
<script type="text/javascript" src="https://www.stat-counter.org/count/d6u8"></script><br>
</div>
<div class="fade-in">
<script type="text/javascript" src="https://www.freevisitorcounters.com/en/home/counter/1086686/t/1"> </script>
</div>
<div class="fade-in">
<a href="https://www.cutercounter.com/" target="_blank"><img src="https://www.cutercounter.com/hits.php?id=huxoacnd&nd=5&style=1" border="0" alt="website counter"> </a>
</div>
</div>
<h5 class="fade-in" id="socials"> Made by the user <a href="https://codepen.io/weaF_z" target=”_blank”> WG563 on codepen.io </a>, aka <a href="https://github.com/wea-f" target=”_blank”>wea-f on github </a>, aka <a href="https://replit.com/@wea-F" target=”_blank”> wea-F on replit </a> <br> FOR MORE INFO AND TERMS CHECK IT OUT <a href="https://github.com/wea-f/Norepted" target="_blank"> HERE </a> <br>
<span class="fade-in" id="condition">!!! I am NOT responsible in anyway if you get in trouble while using Norepted, it is YOUR device and YOU control it. !!! </span>
</h5>
</body>
<script>
//TEST LINK: https://www.youtube.com/watch?v=DneTJMXtqAQ
function setFavicons(favImg) {
let headTitle = document.querySelector("head");
let setFavicon = document.createElement("link");
setFavicon.setAttribute("rel", "shortcut icon");
setFavicon.setAttribute("href", favImg);
headTitle.appendChild(setFavicon);
}
function fix_link() {
var link = document.getElementById("link").value
var link2 = link.replace(/ /gi, "")
var video_id = link.replace("https://www.youtube.com/watch?v=", "")
video_id = video_id.replace("https://youtu.be/", "")
//video_id = video_id.replace("&feature=emb_rel_pause", "")
video_id = video_id.replace("&embeds_euri=https%3A%2F%2Fcdpn.io%2F&feature=emb_rel_end", "")
var final_link = "https://www.youtube-nocookie.com/embed/" + video_id
final_link = final_link.replace("&feature=emb_rel_end","")
document.getElementById("video")
.src = final_link
}
document.body.onkeyup = function(c) {
if (c.key == "Enter" ||
c.code == "Enter" ||
c.keyCode == 13
) {
fix_link()
}
else if (c.key == "0") {
c.preventDefault();
c.stopPropagation();
window.location.replace("https://www.google.com/webhp?igu=1");
}
else if (c.key == "1") {
c.preventDefault();
c.stopPropagation();
document.title = "My Drive - Google Drive";
setFavicons("https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png");
}
}
function copy_link() {
var link = document.getElementById("link").value
var link2 = link.replace(/ /gi, "")
var video_id = link.replace("https://www.youtube.com/watch?v=", "")
video_id = video_id.replace("https://youtu.be/", "")
video_id = video_id.replace("&feature=emb_rel_pause", "")
video_id = video_id.replace("&embeds_euri=https%3A%2F%2Fcdpn.io%2F&feature=emb_rel_end","")
var final_link = "https://www.youtube-nocookie.com/embed/" + video_id
navigator.clipboard.writeText(final_link)
}
function how_it_works() {
window.open("https://github.com/wea-f/Norepted/tree/master")
}
// //SCROLL ANIMATION
const fadeInElems = document.querySelectorAll('.fade-in');
const debounce = (fn) => {
let frame;
return (...params) => {
if (frame) {
cancelAnimationFrame(frame);
}
frame = requestAnimationFrame(() => {
fn(...params);
});
}
};
const handleScroll = debounce(() => {
const windowHeight = window.innerHeight;
const scrollTop = window.scrollY;
const scrollBottom = scrollTop + windowHeight;
fadeInElems.forEach(elem => {
const top = elem.offsetTop;
const height = elem.offsetHeight;
const bottom = top + height;
const isBeforeBottom = bottom - scrollTop > 0;
const isAfterTop = top < scrollBottom;
if (isBeforeBottom && isAfterTop) {
elem.classList.add('active');
} else {
elem.classList.remove('active');
}
});
});
document.addEventListener('scroll', handleScroll);
//Fade in elements on load
fadeInElems.forEach(elem => {
const isVisible = (elem.offsetTop - window.scrollY) < window.innerHeight;
if (isVisible) {
elem.classList.add('active');
} else {
elem.classList.remove('active');
}
});
</script>
</html>