From b04317bf925cdab79610ed618471c1350bfaa0ca Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Mon, 7 Apr 2014 11:38:04 -0700 Subject: [PATCH] Resolve a QR console error --- builds/4chan-X.user.js | 8 ++++++-- builds/crx/script.js | 8 ++++++-- src/General/Navigate.coffee | 2 ++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 0c027b893..334f6c912 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -12568,17 +12568,21 @@ $.addClass(doc, view); ({ index: function() { + var _ref; delete g.THREADID; QR.link.textContent = 'Start a Thread'; if (Conf['Index Mode'] === 'catalog') { - return Index.cb.toggleCatalogMode(); + Index.cb.toggleCatalogMode(); } + return (_ref = QR.posts[0]) != null ? _ref.thread = 'new' : void 0; }, thread: function() { + var _ref; QR.link.textContent = 'Reply to Thread'; if (Conf['Index Mode'] === 'catalog') { - return $.rmClass(doc, 'catalog-mode'); + $.rmClass(doc, 'catalog-mode'); } + return (_ref = QR.posts[0]) != null ? _ref.thread = g.THREADID : void 0; } })[view](); return g.VIEW = view; diff --git a/builds/crx/script.js b/builds/crx/script.js index 91b85a8c8..e49363aa0 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12589,17 +12589,21 @@ $.addClass(doc, view); ({ index: function() { + var _ref; delete g.THREADID; QR.link.textContent = 'Start a Thread'; if (Conf['Index Mode'] === 'catalog') { - return Index.cb.toggleCatalogMode(); + Index.cb.toggleCatalogMode(); } + return (_ref = QR.posts[0]) != null ? _ref.thread = 'new' : void 0; }, thread: function() { + var _ref; QR.link.textContent = 'Reply to Thread'; if (Conf['Index Mode'] === 'catalog') { - return $.rmClass(doc, 'catalog-mode'); + $.rmClass(doc, 'catalog-mode'); } + return (_ref = QR.posts[0]) != null ? _ref.thread = g.THREADID : void 0; } })[view](); return g.VIEW = view; diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index b21dd16fd..dfa260b4e 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -116,10 +116,12 @@ Navigate = delete g.THREADID QR.link.textContent = 'Start a Thread' Index.cb.toggleCatalogMode() if Conf['Index Mode'] is 'catalog' + QR.posts[0]?.thread = 'new' thread: -> QR.link.textContent = 'Reply to Thread' $.rmClass doc, 'catalog-mode' if Conf['Index Mode'] is 'catalog' + QR.posts[0]?.thread = g.THREADID }[view]() g.VIEW = view