gitlab-org--gitlab-foss/app/assets/javascripts/shortcuts_wiki.js

15 lines
378 B
JavaScript
Raw Normal View History

2017-12-19 05:12:32 -05:00
import Mousetrap from 'mousetrap';
import ShortcutsNavigation from './shortcuts_navigation';
2017-04-10 04:40:26 -04:00
import findAndFollowLink from './shortcuts_dashboard_navigation';
2017-03-30 07:52:36 -04:00
export default class ShortcutsWiki extends ShortcutsNavigation {
2017-03-29 07:47:34 -04:00
constructor() {
super();
2017-12-19 05:12:32 -05:00
Mousetrap.bind('e', ShortcutsWiki.editWiki);
2017-03-29 07:47:34 -04:00
}
2017-03-26 16:16:55 -04:00
2017-12-19 05:12:32 -05:00
static editWiki() {
2017-04-11 13:26:01 -04:00
findAndFollowLink('.js-wiki-edit');
2017-03-29 07:47:34 -04:00
}
}