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; }