Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/behaviors/shortcuts/shortcuts_toggle.js')
-rw-r--r--app/assets/javascripts/behaviors/shortcuts/shortcuts_toggle.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/assets/javascripts/behaviors/shortcuts/shortcuts_toggle.js b/app/assets/javascripts/behaviors/shortcuts/shortcuts_toggle.js
index 3f3e0c51de5..22f2478c530 100644
--- a/app/assets/javascripts/behaviors/shortcuts/shortcuts_toggle.js
+++ b/app/assets/javascripts/behaviors/shortcuts/shortcuts_toggle.js
@@ -3,13 +3,7 @@ import 'mousetrap/plugins/pause/mousetrap-pause';
const shorcutsDisabledKey = 'shortcutsDisabled';
-export const shouldDisableShortcuts = () => {
- try {
- return localStorage.getItem(shorcutsDisabledKey) === 'true';
- } catch (e) {
- return false;
- }
-};
+export const shouldDisableShortcuts = () => !window.gon.keyboard_shortcuts_enabled;
export function enableShortcuts() {
localStorage.setItem(shorcutsDisabledKey, false);