Change Funkhwale to Castopod, update some links
This commit is contained in:
parent
7222a8bea3
commit
04b815372c
12
index.html
12
index.html
|
@ -37,13 +37,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<label for="funkwhale">Funkhwale episode url</label>
|
<label for="castopod">Castopod episode url</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="funkwhale-episode-id"
|
name="castopod-episode-id"
|
||||||
id="funkwhale"
|
id="castopod"
|
||||||
value="https://podcast.midline.pl/library/tracks/32/"
|
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.midline.pl/library/tracks/32/"
|
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();"
|
oninput="generateHtml();"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("DOMContentLoaded", function() {
|
window.addEventListener("DOMContentLoaded", function () {
|
||||||
generateHtml()
|
generateHtml()
|
||||||
}, false);
|
}, false);
|
||||||
</script>
|
</script>
|
||||||
|
|
53
script.js
53
script.js
|
@ -1,18 +1,17 @@
|
||||||
function generateHtml() {
|
function generateHtml() {
|
||||||
if (
|
if (
|
||||||
document.querySelector("#episode_name").value &&
|
document.querySelector("#episode_name").value &&
|
||||||
document.querySelector("#funkwhale").value &&
|
document.querySelector("#castopod").value &&
|
||||||
document.querySelector("#peertube").value &&
|
document.querySelector("#peertube").value &&
|
||||||
document.querySelector("#youtube").value
|
document.querySelector("#youtube").value
|
||||||
) {
|
) {
|
||||||
let funkwhale_id;
|
let castopod_url;
|
||||||
let peertube_id;
|
let peertube_id;
|
||||||
try {
|
try {
|
||||||
funkwhale_id = document
|
castopod_url = document
|
||||||
.querySelector("#funkwhale")
|
.querySelector("#castopod").value
|
||||||
.value.split("/tracks/")[1];
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
alert("Podaj prawidłową wartością dla funkwhale");
|
alert("Podaj link do odcinka w Castopod");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -25,21 +24,12 @@ function generateHtml() {
|
||||||
|
|
||||||
const html = `<div class="player">
|
const html = `<div class="player">
|
||||||
<iframe
|
<iframe
|
||||||
scrolling="no"
|
|
||||||
src="https://podcast.midline.pl/front/embed.html?type=track&id=${funkwhale_id}"
|
|
||||||
width="100%"
|
width="100%"
|
||||||
height="160"
|
height="112"
|
||||||
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"
|
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
|
scrolling="no"
|
||||||
|
style="width: 100%; height: 112px; overflow: hidden;"
|
||||||
|
src="${castopod_url}/embed/light"
|
||||||
></iframe>
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -47,7 +37,7 @@ function generateHtml() {
|
||||||
<a
|
<a
|
||||||
title="Link do naszego podcastowego RSSa"
|
title="Link do naszego podcastowego RSSa"
|
||||||
alt="Logo RSS"
|
alt="Logo RSS"
|
||||||
href="https://podcast.midline.pl/feed.xml"
|
href="https://podcast.internet-czas-dzialac.pl/@icd/feed.xml"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
class="logo"
|
class="logo"
|
||||||
|
@ -57,22 +47,21 @@ function generateHtml() {
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
title="${document.querySelector("#episode_name").value} w naszej instancji Funkwhale."
|
title="${document.querySelector("#episode_name").value} na naszej instancji Castopod."
|
||||||
alt="Logo Funkwhale"
|
alt="Logo Castopod"
|
||||||
href="https://podcast.midline.pl/library/tracks/${funkwhale_id}"
|
href="${castopod_url}"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
class="logo"
|
class="logo"
|
||||||
style="--dark-image: url('https://assets.midline.pl/logos/dark/funkwhale.svg')"
|
style="--dark-image: url('https://assets.midline.pl/logos/dark/castopod.svg')"
|
||||||
src="https://assets.midline.pl/logos/light/funkwhale.svg"
|
src="https://assets.midline.pl/logos/light/castopod.svg?v=2"
|
||||||
height="32"
|
height="32"
|
||||||
width="32"
|
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
title="Podcast 'Internet. Czas działać!' w aplikacji AntennaPod."
|
title="Podcast 'Internet. Czas działać!' w aplikacji AntennaPod."
|
||||||
alt="Logo 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
|
<img
|
||||||
class="logo"
|
class="logo"
|
||||||
|
@ -143,12 +132,12 @@ function generateHtml() {
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
title="${document.querySelector("#odysee").value
|
title="${document.querySelector("#odysee").value
|
||||||
? `${document.querySelector("#episode_name").value} w serwisie Odysee`
|
? `${document.querySelector("#episode_name").value} w serwisie Odysee`
|
||||||
: `Kanał 'Internet. Czas działać!' w serwisie Odysee.`}"
|
: `Kanał 'Internet. Czas działać!' w serwisie Odysee.`}"
|
||||||
alt="Logo Odysee"
|
alt="Logo Odysee"
|
||||||
href="${document.querySelector("#odysee").value
|
href="${document.querySelector("#odysee").value
|
||||||
? document.querySelector("#odysee").value
|
? document.querySelector("#odysee").value
|
||||||
: 'https://odysee.com/@internetczasdzialac'}"
|
: 'https://odysee.com/@internetczasdzialac'}"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
class="logo"
|
class="logo"
|
||||||
|
@ -171,7 +160,7 @@ function generateHtml() {
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>`;
|
</div>`;
|
||||||
console.log(html);
|
console.log('Copied to clipboard');
|
||||||
document.querySelector("textarea").value = html;
|
document.querySelector("textarea").value = html;
|
||||||
document.querySelector(".preview").innerHTML = html;
|
document.querySelector(".preview").innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user