From bd742bcc35d269e80a2f9ddfaf45adf0cf72a93e Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 31 Jan 2015 12:01:17 -0800 Subject: [PATCH] Fix errors from changing QR shortcut before added to document. --- src/Posting/QR.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 5f3676496..dd4800f10 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -14,7 +14,7 @@ QR = @captcha = Captcha[if noscript then 'noscript' else 'v2'] if Conf['QR Shortcut'] - sc = $.el 'a', + @shortcut = sc = $.el 'a', className: 'qr-shortcut fa fa-comment-o disabled' textContent: 'QR' title: 'Quick Reply' @@ -112,7 +112,7 @@ QR = error: err return if Conf['QR Shortcut'] - $.rmClass $('.qr-shortcut'), 'disabled' + $.rmClass QR.shortcut, 'disabled' close: -> if QR.req @@ -123,7 +123,7 @@ QR = d.activeElement.blur() $.rmClass QR.nodes.el, 'dump' if Conf['QR Shortcut'] - $.addClass $('.qr-shortcut'), 'disabled' + $.addClass QR.shortcut, 'disabled' new QR.post true for post in QR.posts.splice 0, QR.posts.length - 1 post.delete()