This commit is contained in:
2023-06-26 12:41:56 +02:00
parent 2ac6307a55
commit be428301d7
+14
View File
@@ -211,6 +211,7 @@
</div> </div>
<iframe id="downloadsList" src="podcasts.txt" onload="loadList();" style="display: none;"></iframe>
<script> <script>
// Activate stream button only on Saturdays and Sundays 15:00-18:00 // Activate stream button only on Saturdays and Sundays 15:00-18:00
@@ -246,6 +247,19 @@
navbar.style.setProperty('--bs-bg-opacity', 0); navbar.style.setProperty('--bs-bg-opacity', 0);
} }
} }
function loadList() {
var oFrame = document.getElementById("downloadsList");
var strRawContents = oFrame.contentWindow.document.body.childNodes[0].innerHTML;
while (strRawContents.indexOf("\r") >= 0)
strRawContents = strRawContents.replace("\r", "");
var arrLines = strRawContents.split("\n");
alert("File " + oFrame.src + " has " + arrLines.length + " lines");
for (var i = 0; i < arrLines.length; i++) {
var curLine = arrLines[i];
alert("Line #" + (i + 1) + " is: '" + curLine + "'");
}
}
</script> </script>
</body> </body>
</html> </html>