implement "Show Name and Subject" option

This commit is contained in:
ccd0 2014-06-11 10:13:51 -07:00
parent 7b5dc946c9
commit 2afe78f125
3 changed files with 11 additions and 3 deletions

View File

@ -319,6 +319,10 @@ Config =
false
'Remember the spoiler state, instead of resetting after posting.'
]
'Show Name and Subject': [
false
'Always show name and subject fields in the QR even when 4chan doesn\'t use them.'
]
'Hide Original Post Form': [
true
'Hide the normal post form.'

View File

@ -869,9 +869,9 @@ span.hide-announcement {
flex: 1;
width: 0;
}
#qr.forced-anon input[data-name=name],
#qr.forced-anon input[data-name=sub],
#qr.reply-to-thread input[data-name=sub] {
#qr.forced-anon input[data-name=name]:not(.force-show),
#qr.forced-anon input[data-name=sub]:not(.force-show),
#qr.reply-to-thread input[data-name=sub]:not(.force-show) {
display: none;
}
#qr textarea.field {

View File

@ -475,6 +475,10 @@ QR =
QR.max_width_video = QR.max_height_video = 2048
QR.max_duration_video = 120
if Conf['Show Name and Subject']
$.addClass QR.nodes.name, 'force-show'
$.addClass QR.nodes.sub, 'force-show'
QR.forcedAnon = !!$ '.postForm input[name=name][type=hidden]'
if QR.forcedAnon
$.addClass QR.nodes.el, 'forced-anon'