From d60d214f1b3e87dbe85af7d0b67fa4aad471b05a Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 3 Sep 2011 14:48:43 -0700 Subject: [PATCH] data --- 4chan_x.user.js | 6 +++--- script.coffee | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index ce6777ee5..3c0218017 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1502,7 +1502,7 @@ } }, sys: function() { - var c, duration, id, noko, recaptcha, sage, search, thread, url, watch, _, _ref, _ref2; + var duration, id, noko, recaptcha, sage, search, thread, url, watch, _, _ref; if (recaptcha = $('#recaptcha_response_field')) { $.bind(recaptcha, 'keydown', Recaptcha.listener); return; @@ -1518,10 +1518,10 @@ } return parent.postMessage(data, '*'); }); - if (!((c = (_ref = $('b')) != null ? _ref.lastChild : void 0) && c.nodeType === 8)) { + if (!(d = $('b').lastChild.data)) { return; } - _ref2 = c.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref2[0], thread = _ref2[1], id = _ref2[2]; + _ref = d.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], thread = _ref[1], id = _ref[2]; search = location.search; cooldown = /cooldown/.test(search); noko = /noko/.test(search); diff --git a/script.coffee b/script.coffee index 92e5a9721..d95bb2357 100644 --- a/script.coffee +++ b/script.coffee @@ -1183,8 +1183,8 @@ QR = {textContent, href} = node data = JSON.stringify {textContent, href} parent.postMessage data, '*' - return unless (c = $('b')?.lastChild) and c.nodeType is 8 #comment node - [_, thread, id] = c.textContent.match(/thread:(\d+),no:(\d+)/) + return unless d = $('b').lastChild.data #comment + [_, thread, id] = d.match(/thread:(\d+),no:(\d+)/) {search} = location cooldown = /cooldown/.test search noko = /noko/ .test search