Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Vector.js: Difference between revisions

MediaWiki interface page
m Fix: use key 'F' instead of '/'
m Fix: Check altKey instead of ctrlKey
Line 5: Line 5:
document.dispatchEvent(new KeyboardEvent('keydown', {
document.dispatchEvent(new KeyboardEvent('keydown', {
'key': 'F',
'key': 'F',
'ctrlKey': true,
'altKey': true,
'shiftKey': true
'shiftKey': true
}));
}));
};
};

Revision as of 13:49, 5 June 2025

/* All JavaScript here will be loaded for users of the Vector skin */
// Make the search bar on Template:Home/nav activate search.
var searchInput = document.getElementById('home-search');
searchInput.onclick = function() {
	document.dispatchEvent(new KeyboardEvent('keydown', {
		'key': 'F',
		'altKey': true,
		'shiftKey': true
	}));
};
Cookies help us deliver our services. By using our services, you agree to our use of cookies.