fixed identation

pull/4/head
RiedleroD 2023-05-10 10:53:20 +02:00
parent 631394d9a8
commit edadc48bc6
1 changed files with 59 additions and 60 deletions

View File

@ -1,75 +1,74 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>Video site chooser</title> <title>Video site chooser</title>
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">
<style> <style>
html, body { html, body {
height: 100%; 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>
</head> </head>
<body> <body>
<script async> <script async>
const queryString = window.location.search; const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString); const urlParams = new URLSearchParams(queryString);
const codeyt = urlParams.get('yt') const codeyt = urlParams.get('yt')
const codeody = urlParams.get('ody') const codeody = urlParams.get('ody')
const codept = urlParams.get('pt') const codept = urlParams.get('pt')
function changeHref(type,suffix) { function changeHref(type,suffix) {
let btn = document.getElementById(type+'btn'); let btn = document.getElementById(type+'btn');
btn.href+=suffix; btn.href+=suffix;
} }
//wait for page to load before executing js, so the elements actually exist //wait for page to load before executing js, so the elements actually exist
window.addEventListener('load',()=>{ window.addEventListener('load',()=>{
changeHref('yt',codeyt); changeHref('yt',codeyt);
changeHref('piped',codeyt); changeHref('piped',codeyt);
changeHref('pt',codept); changeHref('pt',codept);
changeHref('ody',codeody); changeHref('ody',codeody);
}); });
</script> </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> </body>
</html> </html>