commit
751e285b7b
126
static/ytr.html
126
static/ytr.html
|
@ -1,75 +1,75 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Video site chooser</title>
|
<meta charset="UTF-8"/>
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<title>Video site chooser</title>
|
||||||
<style>
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
html, body {
|
<style>
|
||||||
height: 100%;
|
html,
|
||||||
}
|
body {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
display: table;
|
display: table;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
color: white;
|
color: white;
|
||||||
font: small-caption;
|
font: small-caption;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
border: none;
|
border: none;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 15px 32px;
|
padding: 15px 32px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
cursor:pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pipedbtn {background-color: darkred;} /* Piped */
|
#pipedbtn {background-color: darkred} /* Piped */
|
||||||
#ytbtn {background-color: red;} /* YouTube */
|
#ytbtn {background-color: red} /* YouTube */
|
||||||
#odybtn {background-color: purple;} /* Odysee */
|
#odybtn {background-color: purple} /* Odysee */
|
||||||
#ptbtn {background-color: darkorange;} /* PeerTube */
|
#ptbtn {background-color: darkorange} /* PeerTube */
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
const queryString = window.location.search;
|
||||||
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
const codeyt = urlParams.get('yt')
|
||||||
|
const codeody = urlParams.get('ody')
|
||||||
|
const codept = urlParams.get('pt')
|
||||||
|
|
||||||
|
function changeHref(type,suffix) {
|
||||||
|
let btn = document.getElementById(type+'btn');
|
||||||
|
btn.href+=suffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
//wait for page to load before executing js, so the elements actually exist
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
changeHref('yt',codeyt);
|
||||||
|
changeHref('piped',codeyt);
|
||||||
|
changeHref('pt',codept);
|
||||||
|
changeHref('ody',codeody);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script async>
|
<p>Where do you want to watch this video?</p>
|
||||||
const queryString = window.location.search;
|
<a id="pipedbtn" class="button" href="https://il.ax/embed/">Piped (il.ax)</a>
|
||||||
const urlParams = new URLSearchParams(queryString);
|
<a id="ytbtn" class="button" href="https://youtube.com/embed/">YouTube*</a>
|
||||||
const codeyt = urlParams.get('yt')
|
<a id="odybtn" class="button" href="https://odysee.com/$/embed/@gianmarcogg03:e/">Odysee*</a>
|
||||||
const codeody = urlParams.get('ody')
|
<a id="ptbtn" class="button" href="https://peertube.uno/videos/embed/">PeerTube</a>
|
||||||
const codept = urlParams.get('pt')
|
<p>* = not freedom and/or privacy respecting.</p>
|
||||||
|
|
||||||
function changeHref(type,suffix) {
|
|
||||||
let btn = document.getElementById(type+'btn');
|
|
||||||
btn.href+=suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
//wait for page to load before executing js, so the elements actually exist
|
|
||||||
window.addEventListener('load',()=>{
|
|
||||||
changeHref('yt',codeyt);
|
|
||||||
changeHref('piped',codeyt);
|
|
||||||
changeHref('pt',codept);
|
|
||||||
changeHref('ody',codeody);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<p>Where do you want to watch this video?</p>
|
|
||||||
<a id="pipedbtn" class="button" href="https://il.ax/embed/">Piped (il.ax)</a>
|
|
||||||
<a id="ytbtn" class="button" href="https://youtube.com/embed/">YouTube*</a>
|
|
||||||
<a id="odybtn" class="button" href="https://odysee.com/$/embed/@gianmarcogg03:e/">Odysee*</a>
|
|
||||||
<a id="ptbtn" class="button" href="https://peertube.uno/videos/embed/">PeerTube</a>
|
|
||||||
<p>* = not freedom and/or privacy respecting.</p>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue