gitlab-org--gitlab-foss/app/assets/javascripts/docs/docs_bundle.js
2018-02-21 20:22:56 +00:00

10 lines
315 B
JavaScript

import Mousetrap from 'mousetrap';
function addMousetrapClick(el, key) {
el.addEventListener('click', () => Mousetrap.trigger(key));
}
export default () => {
addMousetrapClick(document.querySelector('.js-trigger-shortcut'), '?');
addMousetrapClick(document.querySelector('.js-trigger-search-bar'), 's');
};