Added the video redirect code from ytr.gianmarco.gg and changed a comment in the video embed shortcode
parent
66d6ef21f9
commit
631394d9a8
|
@ -0,0 +1,75 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Video site chooser</title>
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
display: table;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
background-color: #000000;
|
||||
color: white;
|
||||
font: small-caption;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button {
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 15px 32px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
#pipedbtn {background-color: darkred;} /* Piped */
|
||||
#ytbtn {background-color: red;} /* YouTube */
|
||||
#odybtn {background-color: purple;} /* Odysee */
|
||||
#ptbtn {background-color: darkorange;} /* PeerTube */
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script async>
|
||||
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>
|
||||
|
||||
<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>
|
||||
</html>
|
|
@ -5,4 +5,4 @@
|
|||
</div>
|
||||
|
||||
<!-- og width was 640 -->
|
||||
<!-- to get the code of the iframe just go to ytr.gianmarco.gg and open the source of the page :) -->
|
||||
<!-- iframe code is at /static/ytr.html -->
|
||||
|
|
Loading…
Reference in New Issue