diff --git a/4chan_x.user.js b/4chan_x.user.js index 979700ab4..d8f980701 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -139,6 +139,7 @@ backlink: '>>%id', favicon: 'ferongr', hotkeys: { + openOptions: 'ctrl+o', close: 'Esc', spoiler: 'ctrl+s', openQR: 'i', @@ -893,8 +894,11 @@ 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 = $('#overlay')) { + if (o = $.id('overlay')) { $.rm(o); } else if (qr.el) { qr.close(); @@ -1305,6 +1309,7 @@
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 7632d65c1..2175ab9c1 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' @@ -649,8 +650,10 @@ keybinds = thread = nav.getThread() switch key + when conf.openOptions + options.dialog() unless $.id 'overlay' when conf.close - if o = $ '#overlay' + if o = $.id 'overlay' $.rm o else if qr.el qr.close() @@ -966,6 +969,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