shortcuts_wiki.js 363 Bytes
Newer Older
1
/* eslint-disable class-methods-use-this*/
2 3 4
/* global Mousetrap */
/* global ShortcutsNavigation */

5
export default class ShortcutsWiki extends ShortcutsNavigation {
geoandri's avatar
geoandri committed
6 7
  constructor() {
    super();
geoandri's avatar
geoandri committed
8 9
    this.$wikiEdit = $('.wiki-edit');
    Mousetrap.bind('e', this.editWiki.bind(this));
geoandri's avatar
geoandri committed
10
  }
11

geoandri's avatar
geoandri committed
12
  editWiki() {
geoandri's avatar
geoandri committed
13
    gl.utils.visitUrl(this.$wikiEdit.attr('href'));
geoandri's avatar
geoandri committed
14 15
  }
}