Add wikiEdit to constructor
This commit is contained in:
parent
b96abc7d26
commit
07442bf841
1 changed files with 3 additions and 3 deletions
|
@ -1,14 +1,14 @@
|
|||
/* eslint-disable class-methods-use-this*/
|
||||
/* global Mousetrap */
|
||||
/* global ShortcutsNavigation */
|
||||
|
||||
export default class ShortcutsWiki extends ShortcutsNavigation {
|
||||
constructor() {
|
||||
super();
|
||||
Mousetrap.bind('e', this.editWiki);
|
||||
this.$wikiEdit = $('.wiki-edit');
|
||||
Mousetrap.bind('e', this.editWiki.bind(this));
|
||||
}
|
||||
|
||||
editWiki() {
|
||||
gl.utils.visitUrl($('.wiki-edit').attr('href'));
|
||||
gl.utils.visitUrl(this.$wikiEdit.attr('href'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue