From e2051be615f30d25fa44790d4d24dd572523b9f8 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 19 Feb 2012 17:26:19 +0100 Subject: [PATCH] Fix missing parentheses in auto-gif. Close #245 --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index a18356ebc..0c5b53ccd 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3339,7 +3339,7 @@ var src, thumb; if (root.hidden || !(thumb = $('img[md5]', root))) return; src = thumb.parentNode.href; - if (/gif$/.test(src && !/^Spoiler/.test(thumb.alt))) return thumb.src = src; + if (/gif$/.test(src) && !/^Spoiler/.test(thumb.alt)) return thumb.src = src; } }; diff --git a/script.coffee b/script.coffee index ab52e16b6..73f176090 100644 --- a/script.coffee +++ b/script.coffee @@ -2630,7 +2630,7 @@ imgGif = node: (root) -> return if root.hidden or !thumb = $ 'img[md5]', root src = thumb.parentNode.href - if /gif$/.test src and !/^Spoiler/.test thumb.alt + if /gif$/.test(src) and !/^Spoiler/.test thumb.alt thumb.src = src imgExpand =