// SCRIPTS FOR THE NEW AUDIO PLAYER // edit: mb turned the audio player code to make it work on iOS in September 2022 // commenting out the function below... // (function(){ // function waitForIt(selector, time) { // if(document.querySelector(selector)!=null) { // var chat_title = document.getElementsByClassName("chatbox-title__text")[0]; // var element = document.createElement("span"); // element.innerHTML = '
'; // chat_title.insertAdjacentElement('afterend', element); // return; // } // else { // setTimeout(function() { // waitForIt(selector, time); // }, time); // } // } // waitForIt(".toggle-smiley", 1000); // })(); // $(function() { // console.log("PARENT READY"); // $("iframe").on("load", function(){ // console.log("LOADED"); // $(this).contents().find('.kiwi-startup-common').hide(); // }); // }); // SCRIPT for button to hide side pannel --> function fside() { var element = document.getElementById("side"); element.classList.toggle("sideminclicked"); } // SCRIPT MOBILE SIDEMENU HIDE var x = window.matchMedia("(max-width: 768px)") function fsidemobile(x) { if (x.matches) { // If media query matches var element = document.getElementById("side"); element.classList.toggle("sideminclicked"); } // else { // element.classList.toggle(""); // } } fsidemobile(x) function hideshowWelcome() { var elwel = document.getElementById("showWel"); elwel.classList.toggle("hide"); var bwel = document.getElementById("button_wel"); bwel.classList.toggle("show_button") we = document.getElementById("showWel"); we.scrollIntoView(); } function hideshowChat() { var elchat = document.getElementById("showChat"); elchat.classList.toggle("hide"); var bchat = document.getElementById("button_chat"); bchat.classList.toggle("show_button") cha = document.getElementById("showChat"); cha.scrollIntoView(); } function hideshowPad() { var elether = document.getElementById("showEther"); elether.classList.toggle("hide"); var bether = document.getElementById("button_ether"); bether.classList.toggle("show_button") eth = document.getElementById("showEther"); eth.scrollIntoView(); } function hideshowAudio() { var elau = document.getElementById("showAudio"); elau.classList.toggle("hide"); var bau = document.getElementById("button_au"); bau.classList.toggle("show_button") au = document.getElementById("showAudio"); au.scrollIntoView(); } function hideshowJitsi() { var eljit = document.getElementById("showJit"); eljit.classList.toggle("hide"); var bjit = document.getElementById("button_jit"); bjit.classList.toggle("show_button") jit = document.getElementById("showJit"); jit.scrollIntoView(); } function hideshowEssay() { var eless = document.getElementById("showEssay"); eless.classList.toggle("hide"); var bess = document.getElementById("button_ess"); bess.classList.toggle("show_button") ess = document.getElementById("showEssay"); ess.scrollIntoView(); } function hideshowVideo() { var elvid = document.getElementById("showVideo"); elvid.classList.toggle("hide"); var bvid = document.getElementById("button_vid"); bvid.classList.toggle("show_button") vid = document.getElementById("showVideo"); vid.scrollIntoView(); } function hideshowIMG() { var elimg = document.getElementById("showImg"); elimg.classList.toggle("hide"); var bimg = document.getElementById("button_img"); bimg.classList.toggle("show_button") im = document.getElementById("showImg"); im.scrollIntoView(); } function hideshowGal() { var elgal = document.getElementById("showGal"); elgal.classList.toggle("hide"); var bgal = document.getElementById("button_gal"); bgal.classList.toggle("show_button") gal = document.getElementById("showGal"); gal.scrollIntoView(); } // button while playing extra style function bplaytoggle () { var pbutton = document.getElementById("bp"); pbutton.classList.add("bClicked"); var sbutton = document.getElementById("bs"); sbutton.classList.remove("bClicked"); } function bstoptoggle () { var pbutton = document.getElementById("bp"); pbutton.classList.remove("bClicked"); var sbutton = document.getElementById("bs"); sbutton.classList.add("bClicked"); } // src="https://vjs.zencdn.net/7.10.2/video.min.js" // var player = videojs("#player"); // var aud1= document.getElementById('audioBG'); // var dur1= document.getElementById('dur1'); // function mDur(dur,aud){dur.max= aud.duration}; // function mPlay(dur,aud){dur.value=aud.currentTime}; // function mSet(dur,aud){aud.currentTime=dur.value}; // function playpause(podcast){ // var myAudio = document.getElementById(podcast); // var myIcon = document.querySelector("."+podcast); // if (myAudio.paused) { // myIcon.className = podcast+" fa b-pause"; // myAudio.play(); // } else { // myIcon.className = podcast+" fa b-play"; // myAudio.pause(); // } // }