This commit is contained in:
2023-06-23 15:31:17 +02:00
parent 2ec65d24f6
commit adc5787434
+16 -1
View File
@@ -80,7 +80,7 @@
<h1 id="radio" class="display-5 fw-bold lh-1 mb-3">Live als Stream</h1>
<p class="lead">Immer samstags und sonntags ab 15:00 Uhr im</p>
<p class="text-center">
<a class="btn btn-primary btn-lg px-4 me-sm-3" href="https://www.nodebucket.de:8444/radioanton">Livestream</a>
<a id="streamBtn" class="btn btn-primary btn-lg px-4 me-sm-3" href="https://www.nodebucket.de:8444/radioanton">Livestream</a>
</p>
</div>
</div>
@@ -452,6 +452,21 @@
<script src="{{ theme_url }}/js/utils.js" type="text/javascript"></script>
<script src="{{ theme_url }}/js/pico.js" type="text/javascript"></script>
-->
<script>
const element = document.getElementById("streamBtn");
setInterval(function() {
const d = new Date();
let day = d.getDay();
let hour = d.getHours();
if ((day == 0 || day == 6) && (hour >= 15 && hour <= 18)) {
document.getElementById("streamBtn").classList.add("disabled");
}
else {
document.getElementById("streamBtn").classList.remove("disabled");
}
}, 1000);
</script>
<!--script>
// When the user scrolls down 80px from the top of the document, resize the navbar's padding and the logo's font size