From f96e046af4ad6ff467d34aeb5d5366c1f0f840c7 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 9 Mar 2014 15:43:30 -0700 Subject: [PATCH] Change the index mod keybinds. These ones are probably even more dumb, though. --- builds/4chan-X.user.js | 11 +++++++---- builds/crx/script.js | 11 +++++++---- src/General/Config.coffee | 8 ++++---- src/Miscellaneous/Keybinds.coffee | 1 + 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 21d7a8714..fbfd3bd49 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -329,10 +329,10 @@ 'Next page': ['Shift+Right', 'Jump to the next page.'], 'Previous page': ['Shift+Left', 'Jump to the previous page.'], 'Search form': ['Ctrl+Alt+s', 'Focus the search field on the board index.'], - 'Paged mode': ['Ctrl+1', 'Sets the index mode to paged.'], - 'All pages mode': ['Ctrl+2', 'Sets the index mode to all threads.'], - 'Catalog mode': ['Ctrl+3', 'Sets the index mode to catalog.'], - 'Cycle sort type': ['Ctrl+x', 'Cycle through index sort types.'], + 'Paged mode': ['Alt+1', 'Sets the index mode to paged.'], + 'All pages mode': ['Alt+2', 'Sets the index mode to all threads.'], + 'Catalog mode': ['Alt+3', 'Sets the index mode to catalog.'], + 'Cycle sort type': ['Alt+x', 'Cycle through index sort types.'], 'Next thread': ['Shift+Down', 'See next thread.'], 'Previous thread': ['Shift+Up', 'See previous thread.'], 'Expand thread': ['Ctrl+e', 'Expand thread.'], @@ -12053,6 +12053,9 @@ Index.setIndexMode('catalog'); break; case Conf['Cycle sort type']: + if (g.VIEW !== 'index') { + return; + } Index.cycleSortType(); break; case Conf['Next thread']: diff --git a/builds/crx/script.js b/builds/crx/script.js index ff4b673bd..12327aa39 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -305,10 +305,10 @@ 'Next page': ['Shift+Right', 'Jump to the next page.'], 'Previous page': ['Shift+Left', 'Jump to the previous page.'], 'Search form': ['Ctrl+Alt+s', 'Focus the search field on the board index.'], - 'Paged mode': ['Ctrl+1', 'Sets the index mode to paged.'], - 'All pages mode': ['Ctrl+2', 'Sets the index mode to all threads.'], - 'Catalog mode': ['Ctrl+3', 'Sets the index mode to catalog.'], - 'Cycle sort type': ['Ctrl+x', 'Cycle through index sort types.'], + 'Paged mode': ['Alt+1', 'Sets the index mode to paged.'], + 'All pages mode': ['Alt+2', 'Sets the index mode to all threads.'], + 'Catalog mode': ['Alt+3', 'Sets the index mode to catalog.'], + 'Cycle sort type': ['Alt+x', 'Cycle through index sort types.'], 'Next thread': ['Shift+Down', 'See next thread.'], 'Previous thread': ['Shift+Up', 'See previous thread.'], 'Expand thread': ['Ctrl+e', 'Expand thread.'], @@ -12067,6 +12067,9 @@ Index.setIndexMode('catalog'); break; case Conf['Cycle sort type']: + if (g.VIEW !== 'index') { + return; + } Index.cycleSortType(); break; case Conf['Next thread']: diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 27d44c4b5..6c88f5a56 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -653,19 +653,19 @@ vp-replace 'Focus the search field on the board index.' ] 'Paged mode': [ - 'Ctrl+1' + 'Alt+1' 'Sets the index mode to paged.' ] 'All pages mode': [ - 'Ctrl+2' + 'Alt+2' 'Sets the index mode to all threads.' ] 'Catalog mode': [ - 'Ctrl+3' + 'Alt+3' 'Sets the index mode to catalog.' ] 'Cycle sort type': [ - 'Ctrl+x' + 'Alt+x' 'Cycle through index sort types.' ] # Thread Navigation diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 696517c5e..7886509e3 100755 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -110,6 +110,7 @@ Keybinds = return unless g.VIEW is 'index' and Conf['Index Mode'] isnt 'catalog' Index.setIndexMode 'catalog' when Conf['Cycle sort type'] + return unless g.VIEW is 'index' Index.cycleSortType() # Thread Navigation when Conf['Next thread']