MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
improved preSelect(), allows filling out 'Other' box
dumb mistake with preSelectAmount
Line 320: Line 320:
If there isn't an option, add it to the "Other" box and select that */
If there isn't an option, add it to the "Other" box and select that */
var preSelectAmount = mw.util.getParamValue('preSelect');
var preSelectAmount = mw.util.getParamValue('preSelect');
if ( preSelectAmount.length ) {
if ( preSelectAmount ) {
$preSelectOption = $('input[name="amount"][value="' + preSelectAmount + '"]');
$preSelectOption = $('input[name="amount"][value="' + preSelectAmount + '"]');
if ( $preSelectOption.length ) {
if ( $preSelectOption.length ) {