diff --git a/4chan_x.user.js b/4chan_x.user.js index 527c68c6f..714a6cd76 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -100,7 +100,8 @@ 'Auto Noko': [true, 'Always redirect to your post'], 'Cooldown': [true, 'Prevent \'flood detected\' errors'], 'Quick Reply': [true, 'Reply without leaving the page'], - 'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'] + 'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'], + 'Auto Hide QR': [true, 'Automatically auto-hide the quick reply when posting'] }, Quoting: { 'Quote Backlinks': [true, 'Add quote backlinks'], @@ -1312,7 +1313,9 @@ this.submit(); } $('#error', qr.el).textContent = ''; - qr.autohide.set(); + if (conf['Auto Hide QR']) { + qr.autohide.set(); + } return qr.sage = /sage/i.test($('input[name=email]', this).value); } }, @@ -1371,7 +1374,9 @@ }, persist: function() { qr.dialog(); - return qr.autohide.set(); + if (conf['Auto Hide QR']) { + return qr.autohide.set(); + } }, close: function() { $.rm(qr.el); @@ -2443,7 +2448,9 @@ } if (e.keyCode === 13 && cooldown.duration) { $('#auto', qr.el).checked = true; - return qr.autohide.set(); + if (conf['Auto Hide QR']) { + return qr.autohide.set(); + } } }, reload: function() { diff --git a/script.coffee b/script.coffee index 97e68700d..ce19cfbe6 100644 --- a/script.coffee +++ b/script.coffee @@ -34,6 +34,7 @@ config = 'Cooldown': [true, 'Prevent \'flood detected\' errors'] 'Quick Reply': [true, 'Reply without leaving the page'] 'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'] + 'Auto Hide QR': [true, 'Automatically auto-hide the quick reply when posting'] Quoting: 'Quote Backlinks': [true, 'Add quote backlinks'] 'OP Backlinks': [false, 'Add backlinks to the OP'] @@ -1027,7 +1028,7 @@ qr = else if isQR if !e then @submit() $('#error', qr.el).textContent = '' - qr.autohide.set() + qr.autohide.set() if conf['Auto Hide QR'] qr.sage = /sage/i.test $('input[name=email]', @).value quote: (link) -> @@ -1100,7 +1101,7 @@ qr = persist: -> qr.dialog() - qr.autohide.set() + qr.autohide.set() if conf['Auto Hide QR'] close: -> $.rm qr.el @@ -1846,7 +1847,7 @@ Recaptcha = Recaptcha.reload() if e.keyCode is 13 and cooldown.duration # press enter to enable auto-post if cooldown is still running $('#auto', qr.el).checked = true - qr.autohide.set() + qr.autohide.set() if conf['Auto Hide QR'] reload: -> window.location = 'javascript:Recaptcha.reload()' reloaded: (e) ->