debian-mirror-gitlab/app/assets/javascripts/docs/docs_bundle.js

11 lines
315 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
import Mousetrap from 'mousetrap';
function addMousetrapClick(el, key) {
el.addEventListener('click', () => Mousetrap.trigger(key));
}
2018-03-27 19:54:05 +05:30
export default () => {
2018-03-17 18:26:18 +05:30
addMousetrapClick(document.querySelector('.js-trigger-shortcut'), '?');
addMousetrapClick(document.querySelector('.js-trigger-search-bar'), 's');
2018-03-27 19:54:05 +05:30
};