MediaWiki:Mobile.js: Difference between revisions
Jump to navigation
Jump to search
(Created page with "→All JavaScript here will be loaded for users of the mobile site: →Autoplay videos with autoplay class: var vids = document.getElementsByClassName("autoplay"); for(var...") |
(No difference)
|
Latest revision as of 02:21, 1 October 2021
/* All JavaScript here will be loaded for users of the mobile site */
/* 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();
}