MediaWiki:Resources/landingpage.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
fix 150 variant |
some minor cleanup, formatting |
||
Line 1: | Line 1: | ||
<html> |
<html> |
||
<script |
<script> |
||
$( document ).ready( function () { |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} ); |
|||
function getQuerystring( key ) { |
function getQuerystring( key ) { |
||
key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ); |
key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ); |
||
Line 19: | Line 8: | ||
} |
} |
||
</script> |
|||
<script type="text/javascript"> |
|||
$(document).ready(function(){ |
$(document).ready(function(){ |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
// Disable logo link |
|||
⚫ | |||
⚫ | |||
// Highest previous contribution adjustments (for emails) |
|||
var hpc = getQuerystring( 'hpc' ); |
var hpc = getQuerystring( 'hpc' ); |
||
if( hpc == '' || isNaN( parseFloat( hpc ) ) ){ |
if( hpc == '' || isNaN( parseFloat( hpc ) ) ){ |
||
Line 92: | Line 91: | ||
} |
} |
||
} |
} |
||
}); |
|||
// prefill other amount box if param provided |
|||
$(document).ready(function(){ |
|||
var otherVal = getQuerystring( 'otherVal' ); |
var otherVal = getQuerystring( 'otherVal' ); |
||
if( otherVal == '' || isNaN( parseFloat( otherVal ) ) ){ |
if( otherVal == '' || isNaN( parseFloat( otherVal ) ) ){ |
||
Line 99: | Line 98: | ||
} |
} |
||
otherVal = parseFloat( otherVal ); |
otherVal = parseFloat( otherVal ); |
||
$("#input_amount_other").attr( 'checked', true ); |
$("#input_amount_other").attr( 'checked', true ); |
||
$("#input_amount_other_box").val( otherVal ); |
$("#input_amount_other_box").val( otherVal ); |