Remove 'QR Shortcut' option. #904
This commit is contained in:
parent
c51565aed6
commit
16814f4c73
@ -382,6 +382,7 @@ Settings =
|
|||||||
if compareString < '00001.00012.00000.00000'
|
if compareString < '00001.00012.00000.00000'
|
||||||
set 'Exempt Archives from Encryption', false unless data['Exempt Archives from Encryption']?
|
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 '#qr .persona .field {display: block !important;}' if data['Show Name and Subject']
|
||||||
|
addCSS '#shortcut-qr {display: none;}' if data['QR Shortcut'] is false
|
||||||
changes
|
changes
|
||||||
|
|
||||||
loadSettings: (data, cb) ->
|
loadSettings: (data, cb) ->
|
||||||
|
|||||||
@ -37,21 +37,20 @@ QR =
|
|||||||
name: 'Quick Reply'
|
name: 'Quick Reply'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
if Conf['QR Shortcut']
|
@shortcut = sc = $.el 'a',
|
||||||
@shortcut = sc = $.el 'a',
|
className: 'fa fa-comment-o disabled'
|
||||||
className: 'fa fa-comment-o disabled'
|
textContent: 'QR'
|
||||||
textContent: 'QR'
|
title: 'Quick Reply'
|
||||||
title: 'Quick Reply'
|
href: 'javascript:;'
|
||||||
href: 'javascript:;'
|
$.on sc, 'click', ->
|
||||||
$.on sc, 'click', ->
|
return unless QR.postingIsEnabled
|
||||||
return unless QR.postingIsEnabled
|
if Conf['Persistent QR'] or !QR.nodes or QR.nodes.el.hidden
|
||||||
if Conf['Persistent QR'] or !QR.nodes or QR.nodes.el.hidden
|
QR.open()
|
||||||
QR.open()
|
QR.nodes.com.focus()
|
||||||
QR.nodes.com.focus()
|
else
|
||||||
else
|
QR.close()
|
||||||
QR.close()
|
|
||||||
|
|
||||||
Header.addShortcut 'qr', sc, 540
|
Header.addShortcut 'qr', sc, 540
|
||||||
|
|
||||||
initReady: ->
|
initReady: ->
|
||||||
$.off d, '4chanXInitFinished', @initReady
|
$.off d, '4chanXInitFinished', @initReady
|
||||||
@ -123,8 +122,7 @@ QR =
|
|||||||
message: 'Quick Reply dialog creation crashed.'
|
message: 'Quick Reply dialog creation crashed.'
|
||||||
error: err
|
error: err
|
||||||
return
|
return
|
||||||
if Conf['QR Shortcut']
|
$.rmClass QR.shortcut, 'disabled'
|
||||||
$.rmClass QR.shortcut, 'disabled'
|
|
||||||
|
|
||||||
close: ->
|
close: ->
|
||||||
if QR.req
|
if QR.req
|
||||||
@ -134,8 +132,7 @@ QR =
|
|||||||
QR.cleanNotifications()
|
QR.cleanNotifications()
|
||||||
d.activeElement.blur()
|
d.activeElement.blur()
|
||||||
$.rmClass QR.nodes.el, 'dump'
|
$.rmClass QR.nodes.el, 'dump'
|
||||||
if Conf['QR Shortcut']
|
$.addClass QR.shortcut, 'disabled'
|
||||||
$.addClass QR.shortcut, 'disabled'
|
|
||||||
new QR.post true
|
new QR.post true
|
||||||
for post in QR.posts.splice 0, QR.posts.length - 1
|
for post in QR.posts.splice 0, QR.posts.length - 1
|
||||||
post.delete()
|
post.delete()
|
||||||
|
|||||||
@ -407,11 +407,6 @@ Config =
|
|||||||
true
|
true
|
||||||
'All-in-one form to reply, create threads, automate dumping and more.'
|
'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': [
|
'Persistent QR': [
|
||||||
false
|
false
|
||||||
'The Quick reply won\'t disappear after posting.'
|
'The Quick reply won\'t disappear after posting.'
|
||||||
|
|||||||
@ -50,6 +50,7 @@ Main =
|
|||||||
Conf['JSON Navigation'] = true
|
Conf['JSON Navigation'] = true
|
||||||
Conf['Oekaki Links'] = true
|
Conf['Oekaki Links'] = true
|
||||||
Conf['Show Name and Subject'] = false
|
Conf['Show Name and Subject'] = false
|
||||||
|
Conf['QR Shortcut'] = true
|
||||||
|
|
||||||
# Pseudo-enforce default whitelist while configuration loads
|
# Pseudo-enforce default whitelist while configuration loads
|
||||||
if $.platform is 'crx' then $.global ->
|
if $.platform is 'crx' then $.global ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user