diff --git a/4chan_x.user.js b/4chan_x.user.js index 4bc3efa9b..fd8bf3ea1 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -138,6 +138,7 @@ backlink: '>>%id', favicon: 'ferongr', hotkeys: { + openOptions: 'ctrl+o', close: 'Esc', spoiler: 'ctrl+s', openQR: 'i', @@ -882,6 +883,9 @@ if (!(key = keybinds.keyCode(e))) return; thread = nav.getThread(); switch (key) { + case conf.openOptions: + if (!$.id('overlay')) options.dialog(); + break; case conf.close: if (o = $.id('overlay')) { $.rm(o); @@ -1508,6 +1512,7 @@ textarea.field {\
Keybinds are disabled.
\ \ \ + \ \ \ \ diff --git a/changelog b/changelog index 42e956a24..f3b39266d 100644 --- a/changelog +++ b/changelog @@ -1,6 +1,7 @@ master - mayhem redirect 404'd pictures to archives when possible + new keybind to open the options: ctrl+o the unread count will decrease when inlining quotes of unread posts the report button can open multiple popups again add omploader to the list of optional flavors (http://ompldr.org/upload?url1=) diff --git a/script.coffee b/script.coffee index 16817a05a..7a5bf9621 100644 --- a/script.coffee +++ b/script.coffee @@ -70,6 +70,7 @@ config = backlink: '>>%id' favicon: 'ferongr' hotkeys: + openOptions: 'ctrl+o' close: 'Esc' spoiler: 'ctrl+s' openQR: 'i' @@ -644,6 +645,8 @@ keybinds = thread = nav.getThread() switch key + when conf.openOptions + options.dialog() unless $.id 'overlay' when conf.close if o = $.id 'overlay' $.rm o @@ -1159,6 +1162,7 @@ options =
Keybinds are disabled.
ActionsKeybinds
Open Options
Close Options or QR
Quick spoiler
Open QR with post number inserted
+
ActionsKeybinds
Open Options
Close Options or QR
Quick spoiler
Open QR with post number inserted