chore: Site Fixes

This commit is contained in:
MattTheTekie 2025-06-21 12:35:19 -04:00
commit 812e88ab95
319 changed files with 0 additions and 893 deletions

View file

@ -1,47 +0,0 @@
// Create Music Player
function createYouTubePlayer() {
// Default Playlist
const defaultSrc =
"https://www.youtube-nocookie.com/embed/videoseries?list=PLbiQ_Jf57CBWyu7z1UbCkWc79UNV4xitp&loop=1&enablejsapi=1";
// Create iframe element
const iframe = document.createElement("iframe");
iframe.setAttribute("src", defaultSrc);
iframe.setAttribute("frameborder", "0");
iframe.setAttribute("allowfullscreen", "");
iframe.setAttribute("id", "crtVideo");
iframe.setAttribute("allow", "autoplay");
// Set default volume
iframe.onload = function () {
this.contentWindow.postMessage(
JSON.stringify({
event: "command",
func: "setVolume",
args: [50],
}),
"*"
);
};
// CRT buttons
function setVideoSource(source) {
document.getElementById("crtVideo").src = source;
}
// CRT Upload button
document.getElementById("crtUpload").addEventListener("click", function () {
var url = document.getElementById("crtURL").value;
iframe.setAttribute("src", url);
});
// CRT Reset button
document.getElementById("crtReset").addEventListener("click", function () {
iframe.setAttribute("src", defaultSrc);
});
// Where it appears
const container = document.querySelector(".crt-screen-div div");
container.appendChild(iframe);
return iframe;
}
createYouTubePlayer();