Widget:TriviaText

From Unforgotten Realms Wiki
Revision as of 16:05, 22 December 2016 by imported>Pillowkeeper
Jump to navigationJump to search

<script> window.addEventListener("load", function () { var list = new Array();

list[0] = "0"; list[1] = "1"; list[2] = "2"; list[3] = "3"; list[4] = "4"; list[5] = "5"; list[6] = "6"; list[7] = "7"; list[8] = "8";

var fin = list.length; for (j = 0; j < 6; j++){ var i = Math.floor(Math.random() * list.length);

document.getElementById("trivia").innerHTML = "* " + list[i];

var index = list.indexOf(list[i]); if (index > -1){ list.splice(index, 1); } } });