Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 10: Line 10:
var randomValue = a[Math.floor(a.length * Math.random())];
var randomValue = a[Math.floor(a.length * Math.random())];


document.getElementById("footer-info").innerHTML = document.getElementById("footer-info").innerHTML + li +  randomValue[1];
var url = "<li><i>Read more <a href='http://wiki.massivecraft.com/" + randomValue[1] + "'>Here</a>."
 
document.getElementById("footer-info").innerHTML = document.getElementById("footer-info").innerHTML + li +  randomValue[0] + url;

Revision as of 02:00, 21 January 2016

/* Any JavaScript here will be loaded for all users on every page load. */

var a = [
	["One", "Fish"],
	["Two", "Fish"],
	["Red", "Fish"],
	["Blue", "Fish"],
	];
var li = "<li><b>Did You Know?</b> "
var randomValue = a[Math.floor(a.length * Math.random())];

var url = "<li><i>Read more <a href='http://wiki.massivecraft.com/" + randomValue[1] + "'>Here</a>."

document.getElementById("footer-info").innerHTML = document.getElementById("footer-info").innerHTML + li +  randomValue[0] + url;