add social webseite

This commit is contained in:
nadja
2026-09-01 22:11:21 +02:00
commit 1162939720
5 changed files with 656 additions and 0 deletions

28
app.js Normal file
View File

@@ -0,0 +1,28 @@
(function () {
"use strict";
var TWITCH_CHANNEL = "duda_xd";
/* ------------------------------------------------------------------
* Twitch: Live-Player einbetten. Zeigt automatisch den aktuellen
* Stream, sobald du live bist. Die Domain wird dynamisch gesetzt,
* damit der Player ueberall funktioniert (auch lokal).
* Twitch ist ein iframe-Embed -> keine CORS-Probleme.
* ------------------------------------------------------------------ */
function loadTwitch() {
var wrap = document.getElementById("twitch-embed");
if (!wrap) return;
var domain = window.location.hostname || "localhost";
var iframe = document.createElement("iframe");
iframe.src = "https://player.twitch.tv/?channel=" + TWITCH_CHANNEL +
"&parent=" + domain + "&muted=true";
iframe.setAttribute("title", "Twitch Stream");
iframe.setAttribute("allowfullscreen", "true");
iframe.setAttribute("scrolling", "no");
iframe.setAttribute("allow", "autoplay; fullscreen");
wrap.appendChild(iframe);
}
document.addEventListener("DOMContentLoaded", loadTwitch);
})();