MediaWiki:Monstercalc.js

//Script for adding a small calculator to monster infoboxes, to calculate the experience gained from killing them.

$(document).ready(function{	if ($('span#killXP').length != 0) {			$('span#killXP span').attr('style', 'display:none;')			$('span#killXP').append(' ' + $('#killXP .fightXP').html + ' xp (and ' + $('#killXP .constXP').html + ' Constitution experience) ')			$('input#monsterCalc').keyup(function{ if ($('input#monsterCalc').val - 0 == $('input#monsterCalc').val) { $('#monsterCalcResult').html($('input#monsterCalc').val * $('#killXP .fightXP').text + ' xp and ' + $('input#monsterCalc').val * $('#killXP .constXP').text + ' Constitution experience)')			}		}) } })