User:Darrenrs/common.js

function getKey( event ) { var keycode = event.keyCode; // Keycode 191 is "/" if ( keycode === 191 && mw.config.get('wgAction') === 'view') { $( "#searchInput-container input" ).focus; } }

$(function {	if( mw.config.get("wgAction") !== "edit" && mw.config.get("wgAction") !== "submit" ) {   	$( document ).on( "keyup", function( event ) { getKey(event); } );	} });