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 =