Change Funkhwale to Castopod, update some links
This commit is contained in:
		
							parent
							
								
									7222a8bea3
								
							
						
					
					
						commit
						04b815372c
					
				
							
								
								
									
										10
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								index.html
									
									
									
									
									
								
							| @ -37,13 +37,13 @@ | ||||
| 			</div> | ||||
| 
 | ||||
| 			<div class="input"> | ||||
| 				<label for="funkwhale">Funkhwale episode url</label> | ||||
| 				<label for="castopod">Castopod episode url</label> | ||||
| 				<input | ||||
| 					type="text" | ||||
| 					name="funkwhale-episode-id" | ||||
| 					id="funkwhale" | ||||
| 					value="https://podcast.midline.pl/library/tracks/32/" | ||||
| 					placeholder="https://podcast.midline.pl/library/tracks/32/" | ||||
| 					name="castopod-episode-id" | ||||
| 					id="castopod" | ||||
| 					value="https://podcast.internet-czas-dzialac.pl/@icd/episodes/icd-weekend-4-wizja-nowych-wyszukiwarek-yt-dokleja-sledzace-ciagi-znakow-a-firefox-je-usuwa" | ||||
| 					placeholder="https://podcast.internet-czas-dzialac.pl/@icd/episodes/icd-weekend-4-wizja-nowych-wyszukiwarek-yt-dokleja-sledzace-ciagi-znakow-a-firefox-je-usuwa" | ||||
| 					oninput="generateHtml();" | ||||
| 				> | ||||
| 			</div> | ||||
|  | ||||
							
								
								
									
										45
									
								
								script.js
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								script.js
									
									
									
									
									
								
							| @ -1,18 +1,17 @@ | ||||
| function generateHtml() { | ||||
| 	if ( | ||||
| 		document.querySelector("#episode_name").value && | ||||
| 		document.querySelector("#funkwhale").value && | ||||
| 		document.querySelector("#castopod").value && | ||||
| 		document.querySelector("#peertube").value && | ||||
| 		document.querySelector("#youtube").value | ||||
| 	) { | ||||
| 		let funkwhale_id; | ||||
| 		let castopod_url; | ||||
| 		let peertube_id; | ||||
| 		try { | ||||
| 			funkwhale_id = document | ||||
| 				.querySelector("#funkwhale") | ||||
| 				.value.split("/tracks/")[1]; | ||||
| 			castopod_url = document | ||||
| 				.querySelector("#castopod").value | ||||
| 		} catch (error) { | ||||
| 			alert("Podaj prawidłową wartością dla funkwhale"); | ||||
| 			alert("Podaj link do odcinka w Castopod"); | ||||
| 		} | ||||
| 
 | ||||
| 		try { | ||||
| @ -25,21 +24,12 @@ function generateHtml() { | ||||
| 
 | ||||
| 		const html = `<div class="player">
 | ||||
| 	<iframe | ||||
| 		scrolling="no" | ||||
| 		src="https://podcast.midline.pl/front/embed.html?type=track&id=${funkwhale_id}" | ||||
| 		width="100%" | ||||
| 		height="160" | ||||
| 		frameborder="no" | ||||
| 	></iframe> | ||||
| </div> | ||||
| <div class="player"> | ||||
| 	<iframe | ||||
| 		sandbox="allow-same-origin allow-scripts" | ||||
| 		src="https://video.internet-czas-dzialac.pl/videos/embed/${peertube_id}" | ||||
| 		allowfullscreen="" | ||||
| 		width="100%" | ||||
| 		height="394" | ||||
| 		height="112" | ||||
| 		frameborder="0" | ||||
| 		scrolling="no" | ||||
| 		style="width: 100%; height: 112px;  overflow: hidden;" | ||||
| 		src="${castopod_url}/embed/light" | ||||
| 	></iframe> | ||||
| </div> | ||||
| 
 | ||||
| @ -47,7 +37,7 @@ function generateHtml() { | ||||
| 	<a | ||||
| 		title="Link do naszego podcastowego RSSa" | ||||
| 		alt="Logo RSS" | ||||
| 		href="https://podcast.midline.pl/feed.xml" | ||||
| 		href="https://podcast.internet-czas-dzialac.pl/@icd/feed.xml" | ||||
| 	> | ||||
| 		<img | ||||
| 			class="logo" | ||||
| @ -57,22 +47,21 @@ function generateHtml() { | ||||
| 		/> | ||||
| 	</a> | ||||
| 	<a | ||||
| 		title="${document.querySelector("#episode_name").value} w naszej instancji Funkwhale." | ||||
| 		alt="Logo Funkwhale" | ||||
| 		href="https://podcast.midline.pl/library/tracks/${funkwhale_id}" | ||||
| 		title="${document.querySelector("#episode_name").value} na naszej instancji Castopod." | ||||
| 		alt="Logo Castopod" | ||||
| 		href="${castopod_url}" | ||||
| 	> | ||||
| 		<img | ||||
| 			class="logo" | ||||
| 			style="--dark-image: url('https://assets.midline.pl/logos/dark/funkwhale.svg')" | ||||
| 			src="https://assets.midline.pl/logos/light/funkwhale.svg" | ||||
| 			style="--dark-image: url('https://assets.midline.pl/logos/dark/castopod.svg')" | ||||
| 			src="https://assets.midline.pl/logos/light/castopod.svg?v=2" | ||||
| 			height="32" | ||||
| 			width="32" | ||||
| 		/> | ||||
| 	</a> | ||||
| 	<a | ||||
| 		title="Podcast 'Internet. Czas działać!' w aplikacji AntennaPod." | ||||
| 		alt="Logo AntennaPod" | ||||
| 		href="https://antennapod.org/" | ||||
| 		href="https://antennapod.org/deeplink/subscribe/?url=https://podcast.internet-czas-dzialac.pl/@icd/feed.xml" | ||||
| 	> | ||||
| 		<img | ||||
| 			class="logo" | ||||
| @ -171,7 +160,7 @@ function generateHtml() { | ||||
| 	</a> | ||||
| 
 | ||||
| </div>`; | ||||
| 		console.log(html); | ||||
| 		console.log('Copied to clipboard'); | ||||
| 		document.querySelector("textarea").value = html; | ||||
| 		document.querySelector(".preview").innerHTML = html; | ||||
| 	} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user