User:Greenitthe/timeless.js

From IdleOn MMO Wiki
< User:Greenitthe
Revision as of 18:10, 18 November 2020 by imported>Greenitthe

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
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
bgElemStyle.background = ('url(' + images[Math.floor(Math.random() * images.length)] + ') no-repeat center center fixed');
bgElemStyle.webkitBackgroundSize = 'cover';
bgElemStyle.mozBackgroundSize = 'cover';
bgElemStyle.oBackgroundSize = 'cover';
bgElemStyle.backgroundSize = 'cover';