diff options
Diffstat (limited to 'app/assets/javascripts/pages/shared/wikis/wikis.js')
-rw-r--r-- | app/assets/javascripts/pages/shared/wikis/wikis.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/shared/wikis/wikis.js b/app/assets/javascripts/pages/shared/wikis/wikis.js index 7d0b0c90c8d..8d0105bc681 100644 --- a/app/assets/javascripts/pages/shared/wikis/wikis.js +++ b/app/assets/javascripts/pages/shared/wikis/wikis.js @@ -1,6 +1,7 @@ import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; import Tracking from '~/tracking'; import showToast from '~/vue_shared/plugins/global_toast'; +import ShortcutsWiki from '~/behaviors/shortcuts/shortcuts_wiki'; const TRACKING_EVENT_NAME = 'view_wiki_page'; const TRACKING_CONTEXT_SCHEMA = 'iglu:com.gitlab/wiki_page_context/jsonschema/1-0-1'; @@ -20,6 +21,7 @@ export default class Wikis { Wikis.trackPageView(); Wikis.showToasts(); + Wikis.initShortcuts(); } handleToggleSidebar(e) { @@ -64,4 +66,8 @@ export default class Wikis { const toasts = document.querySelectorAll('.js-toast-message'); toasts.forEach((toast) => showToast(toast.dataset.message)); } + + static initShortcuts() { + new ShortcutsWiki(); // eslint-disable-line no-new + } } |