MediaWiki:Common.js/CardPriceCalc.js

$(document).ready(function {   // Add input elements    $('table#cardPricesCalc td#cardPricesCalcRarity').append('Common Rare Epic Legendary  ');    $('table#cardPricesCalc td#cardPricesCalcNum').append('');    // Calculate    $('table#cardPricesCalc input, table#cardPricesCalc select').change(function { var cardRarity = $("table#cardPricesCalc select#cpcRarity").val; var rarityFactor; switch(cardRarity) { case "Common": rarityFactor = "2"; break; case "Rare": rarityFactor = "20"; break; case "Epic": rarityFactor = "2000"; break; case "Legendary": rarityFactor = "40000"; break; default: rarityFactor = "2"; }       var cardNum = $("table#cardPricesCalc input#cpcNum").val; var cpcResult = rarityFactor * cardNum; $("table#cardPricesCalc td#cardPricesCalcResult").text(cpcResult); });   $('table#cardPricesCalc input, table#cardPricesCalc select').change; });