├── .gitignore
├── .idea
├── Radio.iml
├── codeStyles
│ └── codeStyleConfig.xml
├── discord.xml
├── modules.xml
├── prettier.xml
├── vcs.xml
└── workspace.xml
├── README.md
├── about.html
├── app.js
├── contact.html
├── featured-radios.json
├── index.css
├── index.html
├── index.js
├── legacy
├── legacy.css
├── legacy.html
└── legacy.js
└── radios.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/.idea/Radio.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/discord.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/prettier.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | true
53 |
54 | true
55 | true
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | 1602936835064
99 |
100 |
101 | 1602936835064
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Radio [stara wersja]
3 | Nowa wersja: [web-radio/web-radio.github.io](https://github.com/web-radio/web-radio.github.io)
4 |
5 | # Schemat dodania stacji radiowej
6 | Jeśli chcesz dodać stację radiową której nie ma na poniższej liście możesz użyć tego schematu w radios.json:
7 |
8 | ```js
9 | {
10 | name: "nazwa stacji radiowej",
11 | src: "link do strumienia",
12 | type: "audio/mp3"
13 | }
14 | ```
15 |
16 | # Lista stacji radiowych
17 |
18 | | Lp. | Nazwa stacji | Adres stacji |
19 | |--|--|--|
20 | | 1 | Jedynka | http://mp3.polskieradio.pl:8900/; |
21 | | 2 | Dwójka | http://mp3.polskieradio.pl:8902/; |
22 | | 3 | Trójka | http://mp3.polskieradio.pl:8904/; |
23 | | 4 | RMF FM | http://195.150.20.242:8000/rmf_fm |
24 | | 5 | Radio Maryja | http://radio.zamarproductions.com:5946/; |
25 | | 6 | Radio ZET | http://zet090-02.cdn.eurozet.pl:8404/; |
26 | | 7 | Radio Złote Przeboje | http://poznan7.radio.pionier.net.pl:8000/tuba9-1.mp3 |
27 | | 8 | Złote Przeboje Gdańsk | http://stream10.radioagora.pl/zp_gda_128.mp3 |
28 | | 9 | PR Poznań | http://stream4.nadaje.com:8578/poznan |
29 | | 10 | PR Kraków | http://stream4.nadaje.com:9680/radiokrakow-s3 |
30 | | 11 | PR Katowice | http://stream4.nadaje.com:9212/radiokatowice |
31 | | 12 | PR Opole | http://dab.radio.opole.pl:8035/1 |
32 | | 13 | Meloradio FM | http://mel.cdn.eurozet.pl/mel-ols.mp3 |
33 | | 14 | PR Zachód | http://stream02.zachod.pl:10113/; |
34 | | 15 | Radio Tok FM | http://poznan5-4.radio.pionier.net.pl:8000/tuba10-1.mp3 |
35 | | 16 | PR Szczecin | http://stream4.nadaje.com:11986/prs.aac |
36 | | 17 | PR Olsztyn | http://olsztyn.radio.pionier.net.pl:7055/; |
37 | | 18 | PR Białystok | http://stream4.nadaje.com:15476/radiobialystok |
38 | | 19 | PR Koszalin | http://s0.radiohost.pl:8240/; |
39 | | 20 | PR Pomorza i Kujaw | http://stream.radiopik.pl:9004/; |
40 | | 21 | Białoruskie radio racja | http://air.racyja.com:8000/racja256 |
41 | | 22 | RMF Classic | http://rmfstream1.interia.pl:8000/rmf_classic |
42 | | 23 | Antyradio FM | http://ant-kat-01.cdn.eurozet.pl:8604/; |
43 | | 24 | Radio Plus Gdańsk | http://plu-gdn-02.cdn.eurozet.pl:8304/; |
44 | | 25 | VOX FM | http://85.219.133.18/radio.php?id=-1&url=http://www.eskago.pl/radio/vox-fm |
45 | | 26 | Radio Rodzina | http://sluchaj.radiorodzina.pl/RadioRodzinaWroclawLIVE.mp3 |
46 | | 27 | Muzyczne Radio | http://stream.nadaje.com:9900/; |
47 | | 28 | Radio RDN | http://rdn.pl:8002/; |
48 | | 29 | Radio Plus Legnica | http://stream.plus.legnica.pl:8000/plusaacp |
49 | | 30 | Radio eM | http://91.200.187.58/; |
50 | | 31 | Radio Pogoda | http://stream13.radioagora.pl/tuba38-1.mp3 |
51 | | 32 | KRP Katolickie Radio Podlasie | http://s1.slotex.pl:7038/; |
52 | | 33 | Radio Victoria | https://stream.v4.radiovictoria.pl:8076/;?type=http&nocache=4494 |
53 | | 34 | Muzo FM | http://stream4.nadaje.com/muzo |
54 | | 35 | Rock Radio | http://stream13.radioagora.pl/tuba9004-1.mp3 |
55 | | 36 | Radio Doxa | http://81.210.92.213:8000/; |
56 | | 37 | Radio Weekend | http://stream.weekendfm.pl:8000/weekendfm_najlepsza.aac |
57 | | 38 | VIA - Katolickie Radio Rzeszów | http://62.133.128.18:8040/; |
58 | | 39 | Radio Elka | http://live.elka.pl:8000/elkamp3 |
59 | | 40 | Radio Nadzieja | http://streaming01.technologicznie.net:8000/; |
60 | | 41 | Radio Fiat | http://stream2.nadaje.com:8056/; |
61 | | 42 | Radio CCM | http://primary.moodyradiostream.org/radioccm |
62 | | 43 | Radio Emaus | http://stream.radioemaus.pl:8000/mp3stream |
63 | | 44 | Radio Fara | http://62.133.128.22:8000/; |
64 | | 45 | Radio Plus Gniezno | http://plu02.cdn.eurozet.pl:8308/plu-gnz.fb.mp3 |
65 | | 46 | Radio Plus Radom | http://78.46.170.230:8040/; |
66 | | 47 | Radio Plus Warszawa | http://plu02.cdn.eurozet.pl:8318/plu-waw.mp3 |
67 | | 48 | Radio Leliwa | http://stream2.nadaje.com:8054/; |
68 | | 49 | Chillzet FM | http://chi-net.cdn.eurozet.pl:8900/; |
69 | | 50 | Radio Fama Kielce | http://stream2.nadaje.com:8076/ |
70 | | 51 | Radio Niepokalanów | http://88.199.169.10:8000/; |
71 | | 52 | Radio Parada | http://stream4.nadaje.com:15274/live |
72 | | 53 | Wasze Radio FM | http://stream1.waszeradiofm.pl:8000/stream |
73 | | 54 | Radio Głos | http://87.204.92.180:8000/; |
74 | | 55 | Krdp FM | http://s1.slotex.pl:7762/; |
75 | | 56 | Radio 90 FM | http://streams.radio90.pl:8000/radio90_128kbps_stereo.mp3 |
76 | | 57 | Radio Bielsko | http://stream.nadaje.com:8044/ |
77 | | 58 | Radio Eska | http://waw02-03.ic.smcdn.pl:8000/t043-1.mp3 |
78 | | 59 | RMF MAXXX | http://195.150.20.242:8000/rmf_maxxx |
79 | | 60 | ESKA Trójmiasto | http://waw02-03.ic.smcdn.pl:8000/t048-1.mp3 |
80 | | 61 | Radio Kaszebe | http://stream3.nadaje.com:8048/; |
81 | | 62 | Dark Radio | http://dark.sh/mp3 |
82 | | 63 | Radio Nowy Świat | https://stream.rcs.revma.com/ypqt40u0x1zuv |
83 |
--------------------------------------------------------------------------------
/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Webradio
8 |
9 |
10 |
11 |
42 |
43 |
44 |
69 |
70 |
71 |
72 | O Webradio
73 |
74 | Webradio powstało na przełomie maja-lipca 2020, początkowo pod nazwą Radia Polskie.
75 | Oto ludzie, którzy wniesli coś do projektu:
76 |
77 | - Lambada10 - pomysłodawca, właściel domeny
78 | - MarcinK50 - pomysłodawca, odpowiedzialny całe działanie strony, ten który napisał ten tekst
79 | - kalucky0 - przeniósł kiedyś całą listę stacji do jednego pliku, ułatwiło to pracę
80 | - Pengwius - kiedyś zrobił redesign starej strony
81 | - doteq - dodał ukryty tryb benchmarku RAMu (ciekawe czy go znajdziesz!)
82 |
83 | Wszystkim bardzo dziękuję
84 | MarcinK50
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | const featuredStationsContainer = document.getElementsByClassName('featured-stations-container')[0]
2 |
3 | // FEATURED STATIONS
4 | fetch('https://raw.githubusercontent.com/web-radio/webradio/master/featured-radios.json')
5 | .then(response => response.json())
6 | .then(data => {
7 | const featuredRadios = data
8 |
9 | featuredRadios.forEach(radio => {
10 | console.log(radio.name)
11 |
12 | // UI PART
13 | const stationDiv = document.createElement('div') // create div element
14 | stationDiv.classList = 'bd-example h-100 m-1 col-xs-6' // add classes and css styles (inline css currently only for testing)
15 | stationDiv.style = 'width: 175px;'
16 | if (radio.id == 3) {
17 | stationDiv.innerHTML = `
18 |
19 | ${radio.name}
20 | ` // INNER HTML TEMPLATE, SAME AS index.html L73
21 | } else {
22 | stationDiv.innerHTML = `
23 |
24 | ${radio.name}
25 | ` // INNER HTML TEMPLATE, SAME AS index.html L73
26 | }
27 |
28 | featuredStationsContainer.appendChild(stationDiv)
29 |
30 | // TECHNIC PART
31 | const playbtn = document.querySelector(`.play-btn-${radio.id}`)
32 | let playing = false
33 | let station = new Audio(radio.link)
34 |
35 | playbtn.addEventListener('click', () => {
36 | let icon = playbtn.childNodes[0]
37 |
38 | if(playing == false) {
39 | playing = true
40 | station.play()
41 | icon.classList = 'bi-pause'
42 | } else {
43 | playing = false
44 | station.pause()
45 | icon.classList = 'bi-play'
46 | }
47 | })
48 | });
49 | });
50 |
51 | // SEARCHING
52 | const submitBtn = document.getElementsByClassName('btn-submit')[0]
53 | const searchField = document.getElementsByClassName('search-field')[0]
54 | const searchResultContainer = document.getElementsByClassName('search-result-container')[0]
55 | const featuredStationsSection = document.getElementsByClassName('featured-stations')[0]
56 | const searchResultSection = document.getElementsByClassName('search-result')[0]
57 | const searchResultHeader = document.getElementsByClassName('search-result-header')[0]
58 |
59 | submitBtn.addEventListener('click', () => {
60 | const searchedRadio = searchField.value
61 |
62 | // MAKE FEATURED STATIONS INVISIBLE
63 | featuredStationsSection.style = 'display: none;'
64 | searchResultSection.style = 'display: block;'
65 | // FETCH STATIONS FROM API
66 | fetch(`https://de1.api.radio-browser.info/json/stations/byname/${searchedRadio}`)
67 | .then(response => response.json())
68 | .then(data => {
69 | console.log(data)
70 | searchResultContainer.innerHTML = "" // REMOVE SEARCH RESULT CONTAINER HTML
71 | data.forEach(radio => {
72 | // UI PART
73 | searchResultHeader.innerText = `Wyniki wyszukiwania dla "${searchedRadio}"`
74 | const stationDiv = document.createElement('div') // create div element
75 | stationDiv.classList = 'bd-example h-100 m-1 col-xs-6' // add classes and css styles (inline css currently only for testing)
76 | stationDiv.style = 'width: 175px; max-height: 190px;'
77 | if (!radio.favicon) {
78 | stationDiv.innerHTML = `
79 |
80 | ${radio.name}
81 | ` // INNER HTML TEMPLATE, SAME AS index.html L73
82 | } else {
83 | stationDiv.innerHTML = `
84 |
85 | ${radio.name}
86 | ` // INNER HTML TEMPLATE, SAME AS index.html L73
87 | }
88 |
89 | searchResultContainer.append(stationDiv)
90 |
91 | // TECHNIC PART
92 | const playbtn = document.querySelector(`.play-btn-${radio.stationuuid}`)
93 | let playing = false
94 | let station = new Audio(radio.url_resolved)
95 |
96 | playbtn.addEventListener('click', () => {
97 | let icon = playbtn.childNodes[0]
98 |
99 | if(playing == false) {
100 | playing = true
101 | station.play()
102 | icon.classList = 'bi-pause'
103 | } else {
104 | playing = false
105 | station.pause()
106 | icon.classList = 'bi-play'
107 | }
108 | })
109 | })
110 | })
111 | })
112 |
113 | // additional back feature
114 | document.getElementsByClassName('navbar-brand')[0].addEventListener('click', () => {
115 | featuredStationsSection.style = 'display: block;'
116 | searchResultSection.style = 'display: none;'
117 | })
118 |
--------------------------------------------------------------------------------
/contact.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Webradio
8 |
9 |
10 |
11 |
42 |
43 |
44 |
69 |
70 |
71 |
72 | Kontakt z autorem
73 |
74 | Wszelkie pomysły, znalezione błędy możesz zgłosić w repozytorium na GitHubie
75 | Dodatkowo, możesz nas wesprzeć finansowo, używając kryptowalut:
76 |
77 | - BTC: 3KPKcwdaoSHnmNMiJAimKQf9HizqTwXS1D
78 | - ETH: 0xdfe31a0edd71808a70fd9257974e7b33e71d64d6
79 | - DOGE: D87kh2tYnVnYDHUxjq8Yw91zbJ91rVr6kb
80 |
81 | Za uzbierane pieniądze kupimy kiedyś domenę
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/featured-radios.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 0,
4 | "name": "RMF FM",
5 | "icon": "http://www.rmfon.pl/i/logos/100x100/rmf.png",
6 | "link": "http://195.150.20.9/RMFFM48"
7 | },
8 | {
9 | "id": 1,
10 | "name": "Radio Nowy świat",
11 | "icon": "https://mytuner.global.ssl.fastly.net/media/tvos_radios/d7cncggk4dvq.jpg",
12 | "link": "https://n12.rcs.revma.com/ypqt40u0x1zuv?rj-ttl=5&rj-tok=AAABeect65gAp-ayyf8dAhnI8A"
13 |
14 | },
15 | {
16 | "id": 2,
17 | "name": "Radio Zet",
18 | "icon": "https://prowly-uploads.s3.eu-west-1.amazonaws.com/uploads/4587/assets/46969/radio_zet_rozszerzony_rgb_red_72dpi.png",
19 | "link": "https://zt01.cdn.eurozet.pl/zet-old.mp3"
20 | },
21 | {
22 | "id": 3,
23 | "name": "Polskie Radio Czwórka",
24 | "icon": "https://moje.polskieradio.pl/_img/kanaly/pr4.jpg",
25 | "link": "http://stream3.polskieradio.pl:8906/;stream"
26 | },
27 | {
28 | "id": 4,
29 | "name": "Radio SUR",
30 | "icon": "https://i.imgur.com/rgzBp75.png",
31 | "link": "https://sur.radio.fm/stream_320.mp3"
32 | }
33 | ]
34 |
--------------------------------------------------------------------------------
/index.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --card-background: #fff
3 | }
4 |
5 | body {
6 | margin: 0;
7 | padding: 0;
8 | box-sizing: border-box;
9 | font-family: 'Roboto', sans-serif;
10 | color: #121212;
11 | }
12 |
13 | .container {
14 | height: 100% !important;
15 | }
16 |
17 | .content {
18 | display: flex !important;
19 | flex-flow: row wrap;
20 | }
21 |
22 | span.mdi {
23 | font-size: 20px;
24 | }
25 |
26 | .searcher {
27 | margin-right: auto;
28 | margin-left: auto;
29 | display: block;
30 | width: 200px;
31 | }
32 |
33 | .mdc-text-field {
34 | height: 40px !important;
35 | }
36 |
37 | .mdc-card {
38 | margin: 15px;
39 | width: 300px;
40 | height: 200px;
41 | padding: 10px;
42 | flex: 1 300px;
43 | }
44 |
45 | .mdc-card__media {
46 | height: 70px;
47 | }
48 |
49 | .stationName {
50 | font-size: 20px;
51 | }
52 |
53 | .controls-play {
54 | margin-top: auto;
55 | }
56 |
57 | a {
58 | color: white;
59 | text-decoration: none;
60 | }
61 |
62 | li {
63 | list-style: none;
64 | }
65 |
66 | .mdc-drawer {
67 | z-index: 10000;
68 | }
69 |
70 | .mdc-switch {
71 | margin-left: auto !important;
72 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Webradio
8 |
9 |
10 |
11 |
42 |
43 |
44 |
69 |
70 |
71 |
72 | Proponowane stacje radiowe
73 |
74 |
89 |
90 |
91 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | NOTE!
3 |
4 | THIS IS OLD SCRIPT, YOU DON'T FIND ANYTHING HERE
5 | LOOK AT app.js
6 |
7 | NOTE!
8 | */
9 |
10 | // Your web app's Firebase configuration
11 | // For Firebase JS SDK v7.20.0 and later, measurementId is optional
12 | var firebaseConfig = {
13 | apiKey: "AIzaSyAs4WSvyBoODJIi2VgBwZDZTwhRiBm3-e4",
14 | authDomain: "webradio-3904f.firebaseapp.com",
15 | databaseURL: "https://webradio-3904f.firebaseio.com",
16 | projectId: "webradio-3904f",
17 | storageBucket: "webradio-3904f.appspot.com",
18 | messagingSenderId: "96382163337",
19 | appId: "1:96382163337:web:15c8acd210a462da4b6958",
20 | measurementId: "G-6B26PSM2BT"
21 | };
22 | // Initialize Firebase
23 | firebase.initializeApp(firebaseConfig);
24 | firebase.analytics();
25 | analytics = firebase.analytics()
26 |
27 | Storage.prototype.setObject = function(key, value) {
28 | this.setItem(key, JSON.stringify(value));
29 | }
30 |
31 | Storage.prototype.getObject = function(key) {
32 | var value = this.getItem(key);
33 | return value && JSON.parse(value);
34 | } // Stackoverflow goes brrrr
35 |
36 | const searcher = document.querySelector('.searchInput')
37 | const searchSubmit = document.querySelector('.searchSubmit')
38 |
39 | const content = document.querySelector('.content')
40 | const description = document.querySelector('.pageDescription')
41 | const settings = document.querySelector('.pageSettings')
42 | const contributors = document.querySelector('.pageContributors')
43 |
44 | const settingsBtn = document.querySelector('.settings-button')
45 | const darkModeSwitcher = document.querySelector('#dark-mode-switch')
46 | const switchTop = document.querySelector('.switch-top')
47 | const closeBtn = document.querySelector('.close-button')
48 | const backBtn = document.querySelector('.back-button')
49 |
50 | const contributorsBtn = document.querySelector('.contributorsButton')
51 | const contributorList = document.querySelector('.contributorList')
52 |
53 | searchSubmit.addEventListener('click', () => {
54 | description.style.display = 'none'
55 | let searchQuery = searcher.value
56 | analytics.logEvent('search_radios', { query: searchQuery })
57 | content.innerHTML = ""
58 |
59 | if(searchQuery === "" || searchQuery === "radio") {
60 | content.innerHTML = 'Ta fraza wyszukiwania spowoduje, że twój komputer się zatnie. Nie rób tak więcej, proszę.
'
61 | } else {
62 | if(searchQuery === "/benchmark") searchQuery = "" // easter-egg
63 | fetch(`https://de1.api.radio-browser.info/json/stations/byname/${searchQuery}`)
64 | .then(response => response.json())
65 | .then(data => {
66 | data.forEach((elem) => {
67 | const stationUUID = elem.stationuuid
68 | const stationName = elem.name
69 | const stationCodec = elem.codec
70 | window.stationURL = elem.url_resolved
71 | const stationFavicon = elem.favicon
72 | const testAudioStream = new Audio(stationURL)
73 |
74 | const cardTemplate = document.createElement('div')
75 | cardTemplate.classList = 'mdc-card mdc-card-outlined'
76 | cardTemplate.innerHTML = `${stationName}`
77 |
78 | content.append(cardTemplate)
79 | })
80 |
81 | const playButton = document.querySelectorAll('.controls-play');
82 | const icon = document.querySelectorAll('.play')
83 | const audio = document.querySelectorAll('audio')
84 |
85 | playButton.forEach((button, i) => {
86 | button.addEventListener('click', () => {
87 | if (button.dataset.playing === 'false') {
88 | analytics.logEvent('start_playing_radio', { stationName: button.dataset.radioname })
89 | audio[i].play();
90 | button.dataset.playing = 'true'
91 | icon[i].classList = 'mdi mdi-pause pause'
92 | // if track is playing pause it
93 | } else if (button.dataset.playing === 'true') {
94 | analytics.logEvent('stop_playing_radio', { stationName: button.dataset.radioname })
95 | audio[i].pause();
96 | button.dataset.playing = 'false'
97 | icon[i].classList = 'mdi mdi-play play'
98 | }
99 |
100 | let state = button.getAttribute('aria-checked') === "true" ? true : false
101 | button.setAttribute( 'aria-checked', state ? "false" : "true" );
102 | })
103 | })
104 |
105 | })
106 | }
107 | })
108 |
109 | settingsBtn.addEventListener('click', () => {
110 | content.innerHTML = ''
111 | if(settingsBtn.dataset.checked === 'true') {
112 | content.style.display = 'none'
113 | description.style.display = 'block'
114 | settings.style.display = 'none'
115 | settingsBtn.dataset.checked = 'false'
116 | } else if(settingsBtn.dataset.checked === 'false'){
117 | content.style.display = 'none'
118 | description.style.display = 'none'
119 | settings.style.display = 'block'
120 | settingsBtn.dataset.checked = 'true'
121 | }
122 | })
123 |
124 | darkModeSwitcher.addEventListener('click', () => {
125 | if(darkModeSwitcher.dataset.checked === 'false'){
126 | darkModeSwitcher.checked = true
127 | switchTop.classList = 'mdc-switch mdc-switch--checked switch-top'
128 | darkModeSwitcher.dataset.checked = 'true'
129 | document.body.style.background = '#121212'
130 | document.body.style.color = '#fff'
131 | document.documentElement.style.setProperty('--mdc-theme-surface', '#121212')
132 | document.documentElement.style.setProperty('--mdc-theme-text-primary-on-background', '#fff')
133 | document.documentElement.style.setProperty('--mdc-theme-text-icon-on-background', '#fff')
134 |
135 | localStorage.setItem('settings', JSON.stringify({
136 | 'iconColor': "#fff",
137 | 'primaryTextColor': "#fff",
138 | 'cssTextColor': "#fff",
139 | 'cssBackgroundColor': "#121212",
140 | 'surfaceColor': "#121212"
141 | }))
142 |
143 | } else if(darkModeSwitcher.dataset.checked === 'true') {
144 | darkModeSwitcher.checked = true
145 | switchTop.classList = 'mdc-switch switch-top'
146 | darkModeSwitcher.dataset.checked = 'false'
147 | document.body.style.background = '#fff'
148 | document.body.style.color = '#121212'
149 | document.documentElement.style.setProperty('--mdc-theme-surface', '#fff')
150 | document.documentElement.style.setProperty('--mdc-theme-text-primary-on-background', '#121212')
151 | document.documentElement.style.setProperty('--mdc-theme-text-icon-on-background', '#9f9f9f')
152 |
153 | localStorage.setItem('settings', JSON.stringify({
154 | "iconColor": "#9f9f9f",
155 | "primaryTextColor": "#121212",
156 | "cssTextColor": "#121212",
157 | "cssBackgroundColor": "#fff",
158 | "surfaceColor": "#fff"
159 | }))
160 | }
161 | })
162 |
163 | closeBtn.addEventListener('click', () => {
164 | description.style.display = 'block'
165 | settings.style.display = 'none'
166 | })
167 |
168 | window.addEventListener('load', () => {
169 | window.settingsValues = JSON.parse(localStorage.getItem('settings'))
170 |
171 | if(settingsValues.cssBackgroundColor && settingsValues.cssTextColor && settingsValues.surfaceColor && settingsValues.primaryTextColor && settingsValues.iconColor) {
172 | document.body.style.background = settingsValues.cssBackgroundColor
173 | document.body.style.color = settingsValues.cssTextColor
174 | document.documentElement.style.setProperty('--mdc-theme-surface', settingsValues.surfaceColor)
175 | document.documentElement.style.setProperty('--mdc-theme-text-primary-on-background', settingsValues.primaryTextColor)
176 | document.documentElement.style.setProperty('--mdc-theme-text-icon-on-background', settingsValues.iconColor)
177 | if(settingsValues.cssBackgroundColor !== '#fff') {
178 | switchTop.classList = 'mdc-switch mdc-switch--checked switch-top'
179 | darkModeSwitcher.dataset.checked = 'true'
180 |
181 | }
182 | } else {
183 | localStorage.setItem('settings', {
184 | iconColor: '#9f9f9f',
185 | primaryTextColor: '#121212',
186 | cssTextColor: '#121212',
187 | cssBackgroundColor: '#fff',
188 | surfaceColor: '#fff'
189 | })
190 | }
191 | })
192 |
193 | contributorsBtn.addEventListener('click', () => {
194 | contributorList.innerHTML = ''
195 | content.style.display = 'none'
196 | description.style.display = 'none'
197 | settings.style.display = 'none'
198 | contributors.style.display = 'block'
199 |
200 | fetch('https://api.github.com/repos/web-radio/webradio/contributors')
201 | .then(response => response.json())
202 | .then(data => {
203 | data.forEach(contributor => {
204 | if (contributor.login == 'MarcinK50' || contributor.login == 'Lambada10') {
205 | console.log('maintainer')
206 | } else {
207 | if (contributorList.childElementCount >= 0) {
208 | const listItem = document.createElement('li')
209 | listItem.classList = 'mdc-list-item'
210 | listItem.tabIndex = 0
211 | listItem.innerHTML = `
${contributor.login}`
212 |
213 | contributorList.append(listItem)
214 | }
215 | }
216 | })
217 | })
218 | })
219 |
220 | backBtn.addEventListener('click', () => {
221 | settings.style.display = 'block'
222 | contributors.style.display = 'none'
223 | })
224 | /*
225 | let lang
226 | const searchButton = document.getElementById("searchbutton");
227 | const content = document.querySelector('#content');
228 | const note = document.getElementById("note")
229 | const searcher = document.getElementById("search");
230 | const settingsIcon = document.getElementsByClassName('settingsIcon')
231 |
232 | const langCheckbox = document.querySelector("#langCheckbox")
233 |
234 | const subheader = document.querySelector("#subheader")
235 | const searchLabel = document.querySelector("#searchLabel")
236 | const langLabel = document.querySelector("#langLabel")
237 | const legacyInfo = document.querySelector("#legacyInfo")
238 |
239 | langCheckbox.addEventListener("click", () => {
240 | if (langCheckbox.checked) {
241 | fetch("https://raw.githubusercontent.com/web-radio/webradio/master/languages/polish.json")
242 | .then(response => response.json())
243 | .then(data => {
244 | lang = data
245 | subheader.textContent = data.header
246 | searchLabel.textContent = data.searchText
247 | langLabel.textContent = data.langInfo
248 | legacyInfo.textContent = data.legacyInfo
249 | })
250 | } else {
251 | fetch("https://raw.githubusercontent.com/web-radio/webradio/master/languages/english.json")
252 | .then(response => response.json())
253 | .then(data => {
254 | lang = data
255 | subheader.textContent = data.header
256 | searchLabel.textContent = data.searchText
257 | langLabel.textContent = data.langInfo
258 | legacyInfo.textContent = data.legacyInfo
259 | })
260 | }
261 | })
262 |
263 | document.addEventListener("DOMContentLoaded", () => {
264 | fetch("https://raw.githubusercontent.com/web-radio/webradio/master/languages/polish.json")
265 | .then(response => response.json())
266 | .then(data => {
267 | lang = data
268 | subheader.textContent = data.header
269 | searchLabel.textContent = data.searchText
270 | langLabel.textContent = data.langInfo
271 | legacyInfo.textContent = data.legacyInfo
272 | })
273 | })
274 | */
275 |
--------------------------------------------------------------------------------
/legacy/legacy.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Lato:wght@400&display=swap');
2 |
3 | @media screen and (max-width: 800px) {
4 | #content {
5 | display: grid;
6 | grid-template-columns: 1fr !important;
7 | grid-template-rows: 1fr 1fr 1fr 1fr;
8 | gap: 0 0;
9 | }
10 | }
11 |
12 | body {
13 | background: -webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.9)),to(rgba(0,0,0,.9))),url('https://raw.githubusercontent.com/web-radio/webradio/master/wallpaper.jpg');
14 | background: linear-gradient(rgba(0,0,0,.9),rgba(0,0,0,.9)),url('https://raw.githubusercontent.com/web-radio/webradio/master/wallpaper.jpg');
15 | background-size: cover;
16 | background-attachment: fixed;
17 | overflow: auto;
18 | -webkit-box-align: center;
19 | -ms-flex-align: center;
20 | align-items: center;
21 | -webkit-box-pack: center;
22 | -ms-flex-pack: center;
23 | justify-content: center;
24 | color: #efefef;
25 | font-family: 'Lato', sans-serif;
26 | text-align: center;
27 | font-size: 20px;
28 | margin-top: 10vh;
29 | }
30 |
31 | #content {
32 | display: grid;
33 | grid-template-columns: 1fr 1fr;
34 | grid-template-rows: 1fr 1fr 1fr 1fr;
35 | gap: 0 0;
36 | }
37 |
38 | #container {
39 | width: 90%;
40 | margin-left: auto;
41 | margin-right: auto;
42 | }
43 |
44 | #header {
45 | text-transform: uppercase;
46 | font-size: 24px;
47 | }
48 |
49 | .radioElementLast {
50 | margin-left: auto;
51 | margin-right: auto;
52 | }
53 |
54 | a {
55 | color: white;
56 | }
57 |
58 | #search {
59 | margin: 15px;
60 | padding: 5px;
61 | border-radius: 5px;
62 | border: none;
63 | }
64 |
65 | #searchbutton {
66 | border-radius: 5px;
67 | border: none;
68 | padding: 5px;
69 | }
70 |
71 | .radioElement {
72 | text-align: center;
73 | height: 30%;
74 | width: 100%;
75 | }
76 |
77 | #blue {
78 | color: blue;
79 | }
80 |
81 | #red {
82 | color: #d43f3f;
83 | }
--------------------------------------------------------------------------------
/legacy/legacy.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Webradio
6 |
7 |
8 |
9 |
10 |
13 |
14 |
Webradio - wszystkie radia internetowe w jednym miejscu. za darmo.
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/legacy/legacy.js:
--------------------------------------------------------------------------------
1 | var req = new XMLHttpRequest();
2 | req.open('GET', 'https://raw.githubusercontent.com/web-radio/webradio/master/radios.json', false);
3 | req.send(null);
4 | const radios = JSON.parse(req.response)
5 |
6 | const content = document.querySelector('#content');
7 |
8 | radios.forEach((elem) => {
9 | if(elem.last) {
10 | content.innerHTML += `${elem.name}
`;
11 | } else {
12 | content.innerHTML += `${elem.name}
`;
13 | }
14 | });
--------------------------------------------------------------------------------
/radios.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name":"Jedynka",
4 | "src":"http://mp3.polskieradio.pl:8900/;",
5 | "type":"audio/mp3"
6 | },
7 | {
8 | "name":"Dwójka",
9 | "src":"http://mp3.polskieradio.pl:8902/;",
10 | "type":"audio/mp3"
11 | },
12 | {
13 | "name":"Trójka",
14 | "src":"http://mp3.polskieradio.pl:8904/;",
15 | "type":"audio/mp3"
16 | },
17 | {
18 | "name":"Czwórka",
19 | "src":"http://mp3.polskieradio.pl:8906/;",
20 | "type":"audio/mp3"
21 | },
22 | {
23 | "name":"RMF FM",
24 | "src":"http://195.150.20.242:8000/rmf_fm",
25 | "type":"audio/mp3"
26 | },
27 | {
28 | "name":"Radio Maryja",
29 | "src":"http://radio.zamarproductions.com:5946/;",
30 | "type":"audio/mp3"
31 | },
32 | {
33 | "name":"Radio ZET",
34 | "src":"http://zet090-02.cdn.eurozet.pl:8404/;",
35 | "type":"audio/mp3"
36 | },
37 | {
38 | "name":"Radio Złote Przeboje",
39 | "src":"http://poznan7.radio.pionier.net.pl:8000/tuba9-1.mp3",
40 | "type":"audio/mp3"
41 | },
42 | {
43 | "name":"Złote Przeboje Gdańsk",
44 | "src":"http://stream10.radioagora.pl/zp_gda_128.mp3",
45 | "type":"audio/mp3"
46 | },
47 | {
48 | "name":"PR Poznań",
49 | "src":"http://stream4.nadaje.com:8578/poznan",
50 | "type":"audio/mp3"
51 | },
52 | {
53 | "name":"PR Kraków",
54 | "src":"http://stream4.nadaje.com:9680/radiokrakow-s3",
55 | "type":"audio/mp3"
56 | },
57 | {
58 | "name":"PR Katowice",
59 | "src":"http://stream4.nadaje.com:9212/radiokatowice",
60 | "type":"audio/mp3"
61 | },
62 | {
63 | "name":"PR Opole",
64 | "src":"http://dab.radio.opole.pl:8035/1",
65 | "type":"audio/mp3"
66 | },
67 | {
68 | "name":"Meloradio FM",
69 | "src":"http://mel.cdn.eurozet.pl/mel-ols.mp3",
70 | "type":"audio/mp3"
71 | },
72 | {
73 | "name":"PR Zachód",
74 | "src":"http://stream02.zachod.pl:10113/;",
75 | "type":"audio/mp3"
76 | },
77 | {
78 | "name":"Radio Tok FM",
79 | "src":"http://poznan5-4.radio.pionier.net.pl:8000/tuba10-1.mp3",
80 | "type":"audio/mp3"
81 | },
82 | {
83 | "name":"PR Szczecin",
84 | "src":"http://stream4.nadaje.com:11986/prs.aac",
85 | "type":"audio/mp3"
86 | },
87 | {
88 | "name":"PR Olsztyn",
89 | "src":"http://olsztyn.radio.pionier.net.pl:7055/;",
90 | "type":"audio/mp3"
91 | },
92 | {
93 | "name":"PR Białystok",
94 | "src":"http://stream4.nadaje.com:15476/radiobialystok",
95 | "type":"audio/mp3"
96 | },
97 | {
98 | "name":"PR Koszalin",
99 | "src":"http://s0.radiohost.pl:9680/;",
100 | "type":"audio/mp3"
101 | },
102 | {
103 | "name":"PR Pomorza i Kujaw",
104 | "src":"http://stream.radiopik.pl:9004/;",
105 | "type":"audio/mp3"
106 | },
107 | {
108 | "name":"PR Słupsk",
109 | "src":"http://s0.radiohost.pl:8240/;",
110 | "type":"audio/mp3"
111 | },
112 | {
113 | "name":"Białoruskie Radio Racja",
114 | "src":"http://air.racyja.com:8000/racja256",
115 | "type":"audio/mp3"
116 | },
117 | {
118 | "name":"RMF Classic",
119 | "src":"http://rmfstream1.interia.pl:8000/rmf_classic",
120 | "type":"audio/mp3"
121 | },
122 | {
123 | "name":"Antyradio FM",
124 | "src":"http://ant-kat-01.cdn.eurozet.pl:8604/;",
125 | "type":"audio/mp3"
126 | },
127 | {
128 | "name":"Radio Plus Gdańsk",
129 | "src":"http://plu-gdn-02.cdn.eurozet.pl:8304/;",
130 | "type":"audio/mp3"
131 | },
132 | {
133 | "name":"VOX FM",
134 | "src":"http://85.219.133.18/radio.php?id=-1&url=http://www.eskago.pl/radio/vox-fm",
135 | "type":"audio/mp3"
136 | },
137 | {
138 | "name":"Radio Rodzina",
139 | "src":"http://sluchaj.radiorodzina.pl/RadioRodzinaWroclawLIVE.mp3",
140 | "type":"audio/mp3"
141 | },
142 | {
143 | "name":"Muzyczne Radio",
144 | "src":"http://stream.nadaje.com:9900/;",
145 | "type":"audio/mp3"
146 | },
147 | {
148 | "name":"Radio RDN",
149 | "src":"http://rdn.pl:8002/;",
150 | "type":"audio/mp3"
151 | },
152 | {
153 | "name":"Radio Plus Legnica",
154 | "src":"http://stream.plus.legnica.pl:8000/plusaacp",
155 | "type":"audio/mp3"
156 | },
157 | {
158 | "name":"Radio eM",
159 | "src":"http://91.200.187.58/;",
160 | "type":"audio/mp3"
161 | },
162 | {
163 | "name":"Radio Pogoda",
164 | "src":"http://stream13.radioagora.pl/tuba38-1.mp3",
165 | "type":"audio/mp3"
166 | },
167 | {
168 | "name":"KRP Katolickie Radio Podlasie",
169 | "src":"http://s1.slotex.pl:7038/;",
170 | "type":"audio/mp3"
171 | },
172 | {
173 | "name":"Radio Victoria",
174 | "src":"https://stream.v4.radiovictoria.pl:8076/;?type=http&nocache=4494",
175 | "type":"audio/mp3"
176 | },
177 | {
178 | "name":"Muzo FM",
179 | "src":"http://stream4.nadaje.com/muzo",
180 | "type":"audio/mp3"
181 | },
182 | {
183 | "name":"Rock Radio",
184 | "src":"http://stream13.radioagora.pl/tuba9004-1.mp3",
185 | "type":"audio/mp3"
186 | },
187 | {
188 | "name":"Radio Doxa",
189 | "src":"http://81.210.92.213:8000/;",
190 | "type":"audio/mp3"
191 | },
192 | {
193 | "name":"Radio Weekend",
194 | "src":"http://stream.weekendfm.pl:8000/weekendfm_najlepsza.aac",
195 | "type":"audio/mp3"
196 | },
197 | {
198 | "name":"VIA - Katolickie Radio Rzeszów",
199 | "src":"http://62.133.128.18:8040/;",
200 | "type":"audio/mp3"
201 | },
202 | {
203 | "name":"Radio Elka",
204 | "src":"http://live.elka.pl:8000/elkamp3",
205 | "type":"audio/mp3"
206 | },
207 | {
208 | "name":"Radio Nadzieja",
209 | "src":"http://streaming01.technologicznie.net:8000/;",
210 | "type":"audio/mp3"
211 | },
212 | {
213 | "name":"Radio Fiat",
214 | "src":"http://stream2.nadaje.com:8056/;",
215 | "type":"audio/mp3"
216 | },
217 | {
218 | "name":"Radio CCM",
219 | "src":"http://primary.moodyradiostream.org/radioccm",
220 | "type":"audio/mp3"
221 | },
222 | {
223 | "name":"Radio Emaus",
224 | "src":"http://stream.radioemaus.pl:8000/mp3stream",
225 | "type":"audio/mp3"
226 | },
227 | {
228 | "name":"Radio Fara",
229 | "src":"http://62.133.128.22:8000/;",
230 | "type":"audio/mp3"
231 | },
232 | {
233 | "name":"Radio Plus Gniezno",
234 | "src":"http://plu02.cdn.eurozet.pl:8308/plu-gnz.fb.mp3",
235 | "type":"audio/mp3"
236 | },
237 | {
238 | "name":"Radio Plus Radom",
239 | "src":"http://78.46.170.230:8040/;",
240 | "type":"audio/mp3"
241 | },
242 | {
243 | "name":"Radio Plus Warszawa",
244 | "src":"http://plu02.cdn.eurozet.pl:8318/plu-waw.mp3",
245 | "type":"audio/mp3"
246 | },
247 | {
248 | "name":"Radio Leliwa",
249 | "src":"http://stream2.nadaje.com:8054/;",
250 | "type":"audio/mp3"
251 | },
252 | {
253 | "name":"Chillzet FM",
254 | "src":"http://chi-net.cdn.eurozet.pl:8900/;",
255 | "type":"audio/mp3"
256 | },
257 | {
258 | "name":"Radio Fama Kielce",
259 | "src":"http://stream2.nadaje.com:8076/",
260 | "type":"audio/mp3"
261 | },
262 | {
263 | "name":"Radio Niepokalanów",
264 | "src":"http://88.199.169.10:8000/;",
265 | "type":"audio/mp3"
266 | },
267 | {
268 | "name":"Radio Parada",
269 | "src":"http://stream4.nadaje.com:15274/live",
270 | "type":"audio/mp3"
271 | },
272 | {
273 | "name":"Wasze Radio FM",
274 | "src":"http://stream1.waszeradiofm.pl:8000/stream",
275 | "type":"audio/mp3"
276 | },
277 | {
278 | "name":"Radio Głos",
279 | "src":"http://87.204.92.180:8000/;",
280 | "type":"audio/mp3"
281 | },
282 | {
283 | "name":"Krdp FM",
284 | "src":"http://s1.slotex.pl:7762/;",
285 | "type":"audio/mp3"
286 | },
287 | {
288 | "name":"Radio 90 FM",
289 | "src":"http://streams.radio90.pl:8000/radio90_128kbps_stereo.mp3",
290 | "type":"audio/mp3"
291 | },
292 | {
293 | "name":"Radio Bielsko",
294 | "src":"http://stream.nadaje.com:8044/",
295 | "type":"audio/mp3"
296 | },
297 | {
298 | "name":"Radio Eska",
299 | "src":"http://waw02-03.ic.smcdn.pl:8000/t043-1.mp3",
300 | "type":"audio/mp3"
301 | },
302 | {
303 | "name":"RMF MAXXX",
304 | "src":"http://195.150.20.242:8000/rmf_maxxx",
305 | "type":"audio/mp3"
306 | },
307 | {
308 | "name":"ESKA Trójmiasto",
309 | "src":"http://waw02-03.ic.smcdn.pl:8000/t048-1.mp3",
310 | "type":"audio/mp3"
311 | },
312 | {
313 | "name":"Radio Kaszebe",
314 | "src":"http://stream3.nadaje.com:8048/;",
315 | "type":"audio/mp3"
316 | },
317 | {
318 | "name":"Dark Radio",
319 | "src":"http://dark.sh/mp3",
320 | "type":"audio/mp3",
321 | "last":true
322 | },
323 | {
324 | "name":"Radio Nowy Świat",
325 | "src":"http://stream.rcs.revma.com/ypqt40u0x1zuv",
326 | "type":"audio/mp3"
327 | }
328 | ]
329 |
--------------------------------------------------------------------------------