Merge branch 'master' of Riedler/gmgsite into master

Small update for ytr.html.
next
Gianmarco Gargiulo 2023-05-10 11:09:57 +02:00 committed by Gogs
commit 751e285b7b
1 changed files with 63 additions and 63 deletions

View File

@ -1,75 +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%;
}
<meta charset="UTF-8"/>
<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;
}
html {
display: table;
margin: auto;
}
body {
display: table-cell;
vertical-align: middle;
background-color: #000000;
color: white;
font: small-caption;
}
body {
display: table-cell;
vertical-align: middle;
background-color: #000000;
color: white;
font: small-caption;
}
p {
text-align: center;
}
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;
}
.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>
#pipedbtn {background-color: darkred} /* Piped */
#ytbtn {background-color: red} /* YouTube */
#odybtn {background-color: purple} /* Odysee */
#ptbtn {background-color: darkorange} /* PeerTube */
</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>
<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>
<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>