File ShortcutStore.tsx
has 468 lines of code (exceeds 250 allowed). Consider refactoring.
import { makeAutoObservable } from 'mobx'
import Mousetrap from 'mousetrap'
import { openInNewTab } from 'libs'
import Store from 'stores'
import debounce from 'lodash.debounce'
Similar blocks of code found in 2 locations. Consider refactoring.
process.env.TARGET_BROWSER === 'firefox' && [
['alt+c'],
(event: Event) => {
preventDefault(event)
this.store.containerStore.groupTabsByContainer()
Similar blocks of code found in 2 locations. Consider refactoring.
process.env.TARGET_BROWSER === 'firefox' && [
['alt+x'],
(event: Event) => {
preventDefault(event)
this.store.focusStore.selectTabsInSameContainer()
Similar blocks of code found in 5 locations. Consider refactoring.
[
['l', 'right', 'ctrl+l'],
(event: Event) => {
preventDefault(event)
this.store.focusStore.right()
Similar blocks of code found in 5 locations. Consider refactoring.
[
['h', 'left', 'ctrl+h'],
(event: Event) => {
preventDefault(event)
this.store.focusStore.left()
Similar blocks of code found in 3 locations. Consider refactoring.
[
['x', 'ctrl+x'],
(event: Event) => {
preventDefault(event)
this.store.focusStore.select()
Similar blocks of code found in 5 locations. Consider refactoring.
[
['* u', 'i', 'ctrl+u'],
(event: Event) => {
preventDefault(event)
this.store.searchStore.invertSelect()
Similar blocks of code found in 5 locations. Consider refactoring.
[
['k', 'up', 'ctrl+k'],
(event: Event) => {
preventDefault(event)
this.store.focusStore.up()
Similar blocks of code found in 5 locations. Consider refactoring.
[
['j', 'down', 'ctrl+j'],
(event: Event) => {
preventDefault(event)
this.store.focusStore.down()
Similar blocks of code found in 3 locations. Consider refactoring.
[
['/', 'command+k'],
(event: Event) => {
preventDefault(event)
this.store.searchStore.focus()
Similar blocks of code found in 3 locations. Consider refactoring.
[
['>', 'command+shift+p'],
(event: Event) => {
preventDefault(event)
this.store.searchStore.startCommandSearch()
Similar blocks of code found in 5 locations. Consider refactoring.
[
['* n', 'ctrl+n'],
(event: Event) => {
preventDefault(event)
this.store.tabStore.unselectAll()
packages/extension/src/js/stores/ShortcutStore.tsx on lines 88..95 Similar blocks of code found in 5 locations. Consider refactoring.
[
['* m', 'ctrl+m'],
(event: Event) => {
preventDefault(event)
this.store.searchStore.selectAll()
packages/extension/src/js/stores/ShortcutStore.tsx on lines 88..95 Similar blocks of code found in 5 locations. Consider refactoring.
[
['* c', 'shift+ctrl+c'],
(event: Event) => {
preventDefault(event)
this.store.windowStore.cleanDuplicatedTabs()
Similar blocks of code found in 5 locations. Consider refactoring.
[
['shift+g', 'shift+ctrl+g'],
(event: Event) => {
preventDefault(event)
this.store.focusStore.lastTab()
packages/extension/src/js/stores/ShortcutStore.tsx on lines 88..95 Similar blocks of code found in 5 locations. Consider refactoring.
[
['* a', 'ctrl+8'],
(event: Event) => {
preventDefault(event)
this.store.searchStore.toggleSelectAll()
packages/extension/src/js/stores/ShortcutStore.tsx on lines 88..95 There are no issues that match your filters.