From d751784a143e8db264c9f73c0f11d2be348ba31c Mon Sep 17 00:00:00 2001 From: James Campos Date: Fri, 2 Sep 2011 23:46:13 -0700 Subject: [PATCH] spoiler --- 4chan_x.user.js | 9 ++++++++- script.coffee | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 78b7e2441..c950b999e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1255,6 +1255,7 @@ } }); QR.accept = "'" + accept + "'"; + QR.spoiler = $('.postarea label') ? ' ' : ''; if (conf['Persistent QR']) { QR.dialog(); if (conf['Auto Hide QR']) { @@ -1370,7 +1371,7 @@ QR.el = el = ui.dialog('qr', { top: '0', left: '0' - }, " X
Quick Reply
" + ($.get('captchas', []).length) + " captchas
attach another file
"); + }, " X
Quick Reply
" + QR.spoiler + "
" + ($.get('captchas', []).length) + " captchas
attach another file
"); if (conf['Cooldown']) { QR.cooldown; } @@ -1439,6 +1440,12 @@ } }, reset: function() { + var _ref; + if (!conf['Remember Spoiler']) { + if ((_ref = $('[name=spoiler]', QR.el)) != null) { + _ref.checked = false; + } + } $('textarea', QR.el).value = ''; return QR.attachNext(); }, diff --git a/script.coffee b/script.coffee index cf942d472..c58400099 100644 --- a/script.coffee +++ b/script.coffee @@ -984,6 +984,7 @@ QR = else 'image/' + type QR.accept = "'#{accept}'" + QR.spoiler = if $('.postarea label') then ' ' else '' if conf['Persistent QR'] QR.dialog() if conf['Auto Hide QR'] @@ -1065,7 +1066,7 @@ QR = -
+
#{QR.spoiler}
@@ -1126,6 +1127,7 @@ QR = $.set "cooldown/#{g.BOARD}", cooldown QR.cooldown() reset: -> + $('[name=spoiler]', QR.el)?.checked = false unless conf['Remember Spoiler'] $('textarea', QR.el).value = '' QR.attachNext() submit: (e) ->