Support fileless thread creation.
This commit is contained in:
parent
8a965fe9fc
commit
f48f4c37a9
@ -2354,7 +2354,7 @@
|
||||
}));
|
||||
},
|
||||
submit: function(e) {
|
||||
var callbacks, captcha, captchas, challenge, err, m, opts, post, reply, response, threadID, _ref;
|
||||
var callbacks, captcha, captchas, challenge, err, m, opts, post, reply, response, textOnly, threadID, _ref;
|
||||
if (e != null) {
|
||||
e.preventDefault();
|
||||
}
|
||||
@ -2369,7 +2369,7 @@
|
||||
if (threadID === 'new') {
|
||||
if (((_ref = g.BOARD) === 'vg' || _ref === 'q') && !reply.sub) {
|
||||
err = 'New threads require a subject.';
|
||||
} else if (!reply.file) {
|
||||
} else if (!(reply.file || (textOnly = !!$('input[name=textonly]', $.id('postForm'))))) {
|
||||
err = 'No file selected.';
|
||||
}
|
||||
} else {
|
||||
@ -2422,6 +2422,7 @@
|
||||
com: reply.com,
|
||||
upfile: reply.file,
|
||||
spoiler: reply.spoiler,
|
||||
textonly: textOnly,
|
||||
mode: 'regist',
|
||||
pwd: (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : $('input[name=pwd]').value,
|
||||
recaptcha_challenge_field: challenge,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
master
|
||||
- Mayhem
|
||||
Fix cooldown on /q/.
|
||||
Fix thread creation with no file on /q/.
|
||||
Add /mlp/ archive redirection.
|
||||
|
||||
2.34.4
|
||||
|
||||
@ -1832,8 +1832,8 @@ QR =
|
||||
if threadID is 'new'
|
||||
if g.BOARD in ['vg', 'q'] and !reply.sub
|
||||
err = 'New threads require a subject.'
|
||||
else unless reply.file
|
||||
err = 'No file selected.'
|
||||
else unless reply.file or textOnly = !!$ 'input[name=textonly]', $.id 'postForm'
|
||||
err = 'No file selected.'
|
||||
else
|
||||
unless reply.com or reply.file
|
||||
err = 'No file selected.'
|
||||
@ -1876,14 +1876,15 @@ QR =
|
||||
QR.status progress: '...'
|
||||
|
||||
post =
|
||||
resto: threadID
|
||||
name: reply.name
|
||||
email: reply.email
|
||||
sub: reply.sub
|
||||
com: reply.com
|
||||
upfile: reply.file
|
||||
spoiler: reply.spoiler
|
||||
mode: 'regist'
|
||||
resto: threadID
|
||||
name: reply.name
|
||||
email: reply.email
|
||||
sub: reply.sub
|
||||
com: reply.com
|
||||
upfile: reply.file
|
||||
spoiler: reply.spoiler
|
||||
textonly: textOnly
|
||||
mode: 'regist'
|
||||
pwd: if m = d.cookie.match(/4chan_pass=([^;]+)/) then decodeURIComponent m[1] else $('input[name=pwd]').value
|
||||
recaptcha_challenge_field: challenge
|
||||
recaptcha_response_field: response + ' '
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user