Remove 'QR Shortcut' option. #904

This commit is contained in:
ccd0 2016-06-17 19:48:31 -07:00
parent c51565aed6
commit 16814f4c73
4 changed files with 17 additions and 23 deletions

View File

@ -382,6 +382,7 @@ Settings =
if compareString < '00001.00012.00000.00000'
set 'Exempt Archives from Encryption', false unless data['Exempt Archives from Encryption']?
addCSS '#qr .persona .field {display: block !important;}' if data['Show Name and Subject']
addCSS '#shortcut-qr {display: none;}' if data['QR Shortcut'] is false
changes
loadSettings: (data, cb) ->

View File

@ -37,21 +37,20 @@ QR =
name: 'Quick Reply'
cb: @node
if Conf['QR Shortcut']
@shortcut = sc = $.el 'a',
className: 'fa fa-comment-o disabled'
textContent: 'QR'
title: 'Quick Reply'
href: 'javascript:;'
$.on sc, 'click', ->
return unless QR.postingIsEnabled
if Conf['Persistent QR'] or !QR.nodes or QR.nodes.el.hidden
QR.open()
QR.nodes.com.focus()
else
QR.close()
@shortcut = sc = $.el 'a',
className: 'fa fa-comment-o disabled'
textContent: 'QR'
title: 'Quick Reply'
href: 'javascript:;'
$.on sc, 'click', ->
return unless QR.postingIsEnabled
if Conf['Persistent QR'] or !QR.nodes or QR.nodes.el.hidden
QR.open()
QR.nodes.com.focus()
else
QR.close()
Header.addShortcut 'qr', sc, 540
Header.addShortcut 'qr', sc, 540
initReady: ->
$.off d, '4chanXInitFinished', @initReady
@ -123,8 +122,7 @@ QR =
message: 'Quick Reply dialog creation crashed.'
error: err
return
if Conf['QR Shortcut']
$.rmClass QR.shortcut, 'disabled'
$.rmClass QR.shortcut, 'disabled'
close: ->
if QR.req
@ -134,8 +132,7 @@ QR =
QR.cleanNotifications()
d.activeElement.blur()
$.rmClass QR.nodes.el, 'dump'
if Conf['QR Shortcut']
$.addClass QR.shortcut, 'disabled'
$.addClass QR.shortcut, 'disabled'
new QR.post true
for post in QR.posts.splice 0, QR.posts.length - 1
post.delete()

View File

@ -407,11 +407,6 @@ Config =
true
'All-in-one form to reply, create threads, automate dumping and more.'
]
'QR Shortcut': [
true
'Add a shortcut to the header to toggle the QR.'
1
]
'Persistent QR': [
false
'The Quick reply won\'t disappear after posting.'

View File

@ -50,6 +50,7 @@ Main =
Conf['JSON Navigation'] = true
Conf['Oekaki Links'] = true
Conf['Show Name and Subject'] = false
Conf['QR Shortcut'] = true
# Pseudo-enforce default whitelist while configuration loads
if $.platform is 'crx' then $.global ->