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

17 lines
370 B
JavaScript
Raw Normal View History

2017-04-10 04:40:26 -04:00
/* eslint-disable class-methods-use-this */
2017-03-26 16:16:55 -04:00
/* global Mousetrap */
/* global ShortcutsNavigation */
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-04-10 04:40:26 -04:00
Mousetrap.bind('e', this.editWiki);
2017-03-29 07:47:34 -04:00
}
2017-03-26 16:16:55 -04:00
2017-03-29 07:47:34 -04:00
editWiki() {
2017-04-11 13:26:01 -04:00
findAndFollowLink('.js-wiki-edit');
2017-03-29 07:47:34 -04:00
}
}