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