User:Jens Ingels/common.js

$( document ).ready(function {

/* var name = new Array; name = ["Health","Health regeneration","Mana","Mana regeneration","Range","Attack damage","Attack speed","Armor","Magic resistance","Movement speed"]; i;

function getVariable(name, def) { value = $( "#champion_info-lower td span a[title='"+ name + "']").parent.parent.next; $( value ).addClass( "data-" + def ); s = value.replace(/\(.*?\)/, ' $& '); return value.html; };

if ( wgPageName == 'Miss_Fortune' ) { $( "#Strut" ).append( " Test " ); health = getVariable("Health", "health"); healthreg = getVariable("Health regeneration", "healthreg"); mana = getVariable("Mana", "mana"); manareg = getVariable("Mana regeneration", "manareg"); range = getVariable("Range", "range"); ad = getVariable("Attack damage", "ad"); asp= getVariable("Attack speed", "asp"); armor = getVariable("Armor", "armor"); magicres= getVariable("Magic resistance", "magicres"); movement= getVariable("Movement speed", "movement"); /* s = health.replace(/\(.*?\)/, ' $& '); */ $(".data-health").html(health); //alert(s); //test = health.toString; //test.replace(/\(.*?\)/, "replacement"); //var n=test.replace("\&\#40\;435","\&\#40\;500"); alert(test); //alert(healthData); //healthData = health.search(/\b(/gi);  //alert(healthData);   //health = $( "#champion_info-lower td span a[title='"+ name[i] +"']").parent.parent.next.html;   //alert(health + healthreg + mana);   //location = document.getElementById("champion_info-lower");   //health = $( "#champion_info-lower td:contains('Health')" ).next;   //alert(health.innerHTML);   //console(health.innerHTML); }

});