User:Jens Ingels/common.js

$( document ).ready(function {

if ( wgPageName == 'Miss_Fortune' ) {

//Prepare Arrays var name = ["Health","Health regeneration","Mana","Mana regeneration","Range","Attack damage","Attack speed","Armor","Magic resistance","Movement speed"];

//Test Load Function $( "#Strut" ).append( " Test " );

//Def Classes $.each(name, function( index, val ) {

loc = $( "#champion_info-lower td span a[title='"+ val + "']").parent.parent.next; valueCode = val.toLowerCase.replace(/ /g,"_"); value = loc.html; $( loc ).addClass( "data-" + valueCode ); defCode = value.replace(/\(.*?\)/, ' $& '); $(".data-" + valueCode).html(defCode);

});

//Add buttons $( "#champion_info-lower td:nth-child(2) table th").append( " Lv default 1 2 3 4 5 6 7 8 9 10 11 12 13 <option value='14'>14 <option value='15'>15 <option value='16'>16 <option value='17'>17 <option value='18'>18 " ); healthDefault = $( ".data-health" ).html; health_regenerationDefault = $( ".data-health_regeneration" ).html; manaDefault = $( ".data-mana" ).html; mana_regenerationDefault = $( ".data-mana_regeneration" ).html; rangeDefault = $( ".data-range" ).html; attack_damageDefault = $( ".data-attack_damage" ).html; attack_speedDefault = $( ".data-attack_speed" ).html; armorDefault = $( ".data-armor" ).html; magic_resistanceDefault = $( ".data-magic_resistance" ).html; movement_speedDefault = $( ".data-movement_speed" ).html;

$( "#lv" ).change(function {        infoD = $( ".data-health span" ).html;         infoD = infoD.replace(/\D+/, '');         alert( infoD );      }); }

});