From 5a26f3883d3cad8ddd5a895a29ca6f2a0bb04cbe Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 11 Sep 2012 18:33:25 +0200 Subject: [PATCH] Fix subject selector in Get.title. Fix filename filtering in case of spoiler image. --- 4chan_x.user.js | 4 ++-- script.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 3699c1c35..4259f7993 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -749,7 +749,7 @@ var img; img = post.img; if (img) { - return img.alt; + return img.alt.replace('Spoiler Image, ', ''); } return false; }, @@ -3679,7 +3679,7 @@ title: function(thread) { var el, op, span; op = $('.op', thread); - el = $('.subject', op); + el = $('.postInfo .subject', op); if (!el.textContent) { el = $('blockquote', op); if (!el.textContent) { diff --git a/script.coffee b/script.coffee index a5ed4a2a2..23dbf8f37 100644 --- a/script.coffee +++ b/script.coffee @@ -587,7 +587,7 @@ Filter = filesize: (post) -> {img} = post if img - return img.alt + return img.alt.replace 'Spoiler Image, ', '' false md5: (post) -> {img} = post @@ -2890,7 +2890,7 @@ Get = root title: (thread) -> op = $ '.op', thread - el = $ '.subject', op + el = $ '.postInfo .subject', op unless el.textContent el = $ 'blockquote', op unless el.textContent