Widget:TriviaText: Difference between revisions

From Unforgotten Realms Wiki
Jump to navigationJump to search
imported>Pillowkeeper
No edit summary
imported>Pillowkeeper
No edit summary
Line 13: Line 13:
window.addEventListener("load", function () {
window.addEventListener("load", function () {
var list = new Array();
var list = new Array();
list[0] = "The term <b>\"No Tricks\"</b> originated in the season one campaign </b><a href=\"/wiki/The_Jewel_of_the_Dingo_Isles\">\"The Jewel of the Dingo Isles\"</a></b>"
 
list[1] = "<a href=\"/wiki/Kallark\">Kallark</a> has a pot puppy named <b>Annihilus the Living Death That Walks</b>";
for each ($text)  {
list[2] = "<b><a href=\"/wiki/Kallark\">Slippery Knuckles Malone</a></b> does not recall his original name";
list.push($text);
list[3] = "</b><a href=\"/wiki/Thor\">Thor</a></b> is the son of <a href=\"/wiki/Dragon_Aspect\">Dragon Aspect</a> <a href=\"/wiki/Ouro'ras\">Ouro'ras</a> and is the creator of many races in the Realms";
}
list[4] = "<a href=\"/wiki/Alessa_Stonemason\">Alessa Stonemason</a> is a reference to <b>Alessa Gillespie</b> of the Silent Hill franchise";
list[5] = "No one knows how <a href=\"/wiki/Gnome\">Gnomes</a> came to be";
list[6] = "Before the <a href=\"/wiki/Lore#The_Great_Hatching\">Birth of Magic</a>, the world was a <i>Utopia</i> in which no one could die";
list[7] = "<a href=\"/wiki/Ghana_Ens_Sin\">Ghana Ens Sin</a> is an anagram of <i>shenanigans</i>.";
list[8] = "<a href=\"/wiki/Coestar\">Coestar</a>  has been a player in every campaign (Side Quests included)";


var fin = list.length;
var fin = list.length;

Revision as of 17:39, 22 December 2016

  • <script> function boldHTML() { var element = document.createElement("b"); element.innerHTML = "Bold text"; return element; } window.addEventListener("load", function () { var list = new Array(); for each ($text) { list.push($text); } var fin = list.length; for (j = 0; j < 6; j++){ var ul = document.getElementById("trivia" + j); var i = Math.floor(Math.random() * list.length); ul.insertAdjacentHTML( 'beforeend', list[i] ); var index = list.indexOf(list[i]); if (index > -1){ list.splice(index, 1); } } }); </script>