gitlab-org--gitlab-foss/app/assets/javascripts/docs/docs_bundle.js

11 lines
315 B
JavaScript
Raw Normal View History

2017-12-19 11:18:48 -05:00
import Mousetrap from 'mousetrap';
function addMousetrapClick(el, key) {
el.addEventListener('click', () => Mousetrap.trigger(key));
}
2018-02-21 15:22:56 -05:00
export default () => {
2017-12-19 11:18:48 -05:00
addMousetrapClick(document.querySelector('.js-trigger-shortcut'), '?');
addMousetrapClick(document.querySelector('.js-trigger-search-bar'), 's');
2018-02-21 15:22:56 -05:00
};