This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / configs / services / radio / controls.html
2.4 kB 88 lines
1<!doctype html> 2 3<html lang="en"> 4 <head> 5 <meta charset="utf-8" /> 6 <meta name="viewport" content="width=device-width, initial-scale=1" /> 7 8 <title>The_Playlist Voting!</title> 9 <style> 10 #good { 11 display: block; 12 width: 100%; 13 border: none; 14 background-color: #04aa6d; 15 padding: 14px; 16 margin: 14px 0 0 0; 17 height: 100px; 18 font-size: 16px; 19 cursor: pointer; 20 text-align: center; 21 } 22 #bad { 23 display: block; 24 width: 100%; 25 border: none; 26 background-color: red; 27 padding: 14px; 28 height: 100px; 29 30 margin: 14px 0 0 0; 31 font-size: 16px; 32 cursor: pointer; 33 text-align: center; 34 } 35 </style> 36 </head> 37 38 <body> 39 <div id="votenote"></div> 40 <button id="good" type="button">GUT</button> 41 42 <button id="bad" type="button">SCHLECHT</button> 43 <center> 44 Currently Running: <br /> 45 <div> 46 <b id="current"></b> 47 </div> 48 <div id="vote"></div> 49 <audio controls autoplay="autoplay"> 50 <source src="https://radio.lassul.us/radio.ogg" type="audio/ogg" /> 51 Your browser does not support the audio element. 52 </audio> 53 </center> 54 55 <script> 56 document.getElementById("good").onclick = async () => { 57 let result = await fetch("https://radio.lassul.us/good", { 58 method: "POST", 59 }); 60 document.getElementById("vote").textContent = 61 "Dieses Lied findest du gut"; 62 }; 63 document.getElementById("bad").onclick = async () => { 64 let result = await fetch("https://radio.lassul.us/skip", { 65 method: "POST", 66 }); 67 document.getElementById("vote").textContent = 68 "Dieses Lied findest du schlecht"; 69 document.getElementById("bad").disabled = true; 70 window.setTimeout(function () { 71 document.getElementById("bad").disabled = false; 72 }, 100000); 73 }; 74 75 async function current() { 76 let result = await fetch("https://radio.lassul.us/current", { 77 method: "GET", 78 }); 79 let data = await result.json(); 80 document.getElementById("current").textContent = data.name; 81 } 82 window.onload = function () { 83 window.setInterval("current()", 10000); 84 current(); 85 }; 86 </script> 87 </body> 88</html>