More actions
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', | ||
' | '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
}));
};