MediaWiki:Common.js

/* Autoplay videos with autoplay class */ var vids = document.getElementsByClassName("autoplay"); for(var i = 0; i < vids.length; i++){ vids[i].controls = true; vids[i].setAttribute("playsinline", ""); vids[i].muted = true; vids[i].autoplay = true; vids[i].loop = true; vids[i].play; }

/* Customize audio players */ var audio = document.getElementsByTagName("audio"); for(var i = 0; i < audio.length; i++){ audio[i].setAttribute("controlslist", "nodownload"); }