From e9b776e9342370a2e1c4056ca2215a4263bc74a2 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 10 Jul 2016 04:11:18 -0700 Subject: [PATCH] Read required subject and text only properties from boards.json. #525, #242 --- src/Posting/QR.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 485a1c34b..d4f535182 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -577,9 +577,9 @@ QR = # prevent errors if threadID is 'new' threadID = null - if g.BOARD.ID is 'vg' and !post.sub + if !!g.BOARD.config.require_subject and !post.sub err = 'New threads require a subject.' - else unless $.hasClass(d.body, 'text_only') or post.file or (textOnly = !!$ 'input[name=textonly]', $.id 'postForm') + else unless !!g.BOARD.config.text_only or post.file err = 'No file selected.' else if g.BOARD.threads[threadID].isClosed err = 'You can\'t reply to this thread anymore.' @@ -624,7 +624,6 @@ QR = upfile: post.file filetag: filetag spoiler: post.spoiler - textonly: textOnly mode: 'regist' pwd: QR.persona.getPassword()