User:Greenitthe/timeless.js: Difference between revisions

From IdleOn MMO Wiki
imported>Greenitthe
No edit summary
imported>Greenitthe
No edit summary
Line 1: Line 1:
var images = ['https://static.miraheze.org/idleonwiki/2/26/Background.png', 'https://static.miraheze.org/idleonwiki/0/07/Desert_bg1.png'];
var images = ['https://static.miraheze.org/idleonwiki/2/26/Background.png', 'https://static.miraheze.org/idleonwiki/0/07/Desert_bg1.png'];
document.getElementById('mw-content-container').style.background = ('url(' + images[Math.floor(Math.random() * images.length)] + ') no-repeat center center fixed');
var bgElemStyle = document.getElementById('mw-content-container').style
bgElem.background = ('url(' + images[Math.floor(Math.random() * images.length)] + ') no-repeat center center fixed');
bgElem.webkitBackgroundSize = 'cover';
bgElem.mozBackgroundSize = 'cover';
bgElem.oBackgroundSize = 'cover';
bgElem.backgroundSize = 'cover';

Revision as of 18:10, 18 November 2020

var images = ['https://static.miraheze.org/idleonwiki/2/26/Background.png', 'https://static.miraheze.org/idleonwiki/0/07/Desert_bg1.png'];
var bgElemStyle = document.getElementById('mw-content-container').style
bgElem.background = ('url(' + images[Math.floor(Math.random() * images.length)] + ') no-repeat center center fixed');
bgElem.webkitBackgroundSize = 'cover';
bgElem.mozBackgroundSize = 'cover';
bgElem.oBackgroundSize = 'cover';
bgElem.backgroundSize = 'cover';