MediaWiki:Resources/landingpage.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
adding getQuerystring function from Template:2012FR/Form-template-whereyourdonation |
No edit summary |
||
Line 7: | Line 7: | ||
if ( code == 13 ) return false; |
if ( code == 13 ) return false; |
||
} ); |
} ); |
||
$("#p-logo a").attr("href", "#"); |
|||
$("#p-logo a").attr("title", ""); |
|||
} ); |
} ); |
||
Revision as of 01:22, 9 November 2012
<html>
<script type="text/javascript">
$( document ).ready( function () {
// Disable submitting form with return key
$( 'form' ).bind( 'keypress', function(e) {
var code = ( e.keyCode ? e.keyCode : e.which );
if ( code == 13 ) return false;
} );
$("#p-logo a").attr("href", "#");
$("#p-logo a").attr("title", "");
} );
function getQuerystring( key ) {
key = key.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' );
var regex = new RegExp( '[\\?&]' + key + '=([a-zA-Z0-9\_\-]*)' );
var qs = regex.exec( window.location.search );
return qs == null ? '' : qs[1];
}
</script>
</html>