« MediaWiki:Common.js » : différence entre les versions
Page de l’interface de MediaWiki
Autres actions
mAucun résumé des modifications |
key = ctrl+K |
||
| Ligne 2 : | Ligne 2 : | ||
$( function () { | $( function () { | ||
$( '.citizen-search-trigger' ).on( 'click', function () { | $( '.citizen-search-trigger' ).on( 'click', function () { | ||
$( '#searchInput' ).focus(); | $( '#searchInput' ).focus(); | ||
} ); | } ); | ||
// Raccourci | // Raccourci Ctrl+K (ou Cmd+K sur Mac) | ||
$( document ).on( 'keydown', function ( e ) { | $( document ).on( 'keydown', function ( e ) { | ||
if ( ( e.ctrlKey || e.metaKey ) && e.key === 'k' ) { | |||
if ( e.key === ' | |||
e.preventDefault(); | e.preventDefault(); | ||
$( '#searchInput' ).focus(); | $( '#searchInput' ).focus(); | ||