emptyfm

Listen to your favorite FM Radio station from your browser.
Log | Files | Refs | README | LICENSE

commit e859913de480da4eacabf61e7db24f9424ed015e
parent b5a0492a74171212074708f0ab18981b2b2a8584
Author: Nirmal Kumar R <tildezero@gmail.com>
Date:   Sun, 24 Mar 2024 17:27:46 +0530

Fix indentation

Diffstat:
Memptyfm.js | 18+++++++++---------
Mindex.html | 20+++++++++-----------
2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/emptyfm.js b/emptyfm.js @@ -27,7 +27,7 @@ async function fetchFMStations() { else { queryParams = "countrycode=" + countryCode + "&language=" + langCode + "&hidebroken=true&order=clickcount&reverse=true" } - + const response = await fetch("https://de1.api.radio-browser.info/json/stations/search?" + queryParams); const stations = await response.json(); @@ -64,9 +64,9 @@ function fetchMediaType(url) { ext = last.split(".").pop(); switch (ext) { case "m3u8": - return "application/x-mpegURL"; + return "application/x-mpegURL"; default: - return "audio/mpeg"; + return "audio/mpeg"; } } } @@ -79,10 +79,10 @@ function listCountries() { for (var k in json) { if (json.hasOwnProperty(k)) { - let option = document.createElement("option"); - option.text = json[k]; + let option = document.createElement("option"); + option.text = json[k]; option.value = k; - + selectElem.appendChild(option); } } @@ -97,10 +97,10 @@ function listLanguages() { for (var k in json) { if (json.hasOwnProperty(k)) { - let option = document.createElement("option"); - option.text = json[k]; + let option = document.createElement("option"); + option.text = json[k]; option.value = k; - + selectElem.appendChild(option); } } diff --git a/index.html b/index.html @@ -1,11 +1,12 @@ <!DOCTYPE html> <html> + <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>emptyfm - Listen to your favorite FM radio</title> <link rel="shorcut icon" type="image/png" - href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF4SURBVHgB7Zj/jURQEMfH5f7cLWC3gG1AAwqgAA1QgAYoQAEUQA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ISLcEBFuiAg3RIQbIsINEeHGYUQ+AbWJ/va1HA5qAAAAAElFTkSuQmCC"> <link href="https://vjs.zencdn.net/8.10.0/video-js.css" rel="stylesheet" /> <style> :root { @@ -109,10 +110,11 @@ .vjs-big-play-button, .vjs-loading-spinner { - display: none! important; + display: none ! important; } </style> </head> + <body> <a class="logo" href="/">emptyfm</a> @@ -137,14 +139,8 @@ </header> <div class="fmstations" id="fmlist"></div> - - <video - id="emptyfm" - class="video-js" - controls - preload="auto" - data-setup="{}" - > + + <video id="emptyfm" class="video-js" controls preload="auto" data-setup="{}"> </video> <script src="https://vjs.zencdn.net/8.10.0/video.min.js"></script> @@ -152,4 +148,5 @@ <script src="emptyfm.js"></script> </body> -</html> + +</html> +\ No newline at end of file