diff --git a/4chan_x.user.js b/4chan_x.user.js index 0c5b53ccd..37357dd09 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(src)) return thumb.src = src; } }; @@ -3549,9 +3549,9 @@ if (conf['Anonymize']) anonymize.init(); if (conf['Time Formatting']) Time.init(); if (conf['Sauce']) sauce.init(); + if (conf['Reveal Spoilers']) revealSpoilers.init(); if (conf['Image Auto-Gif']) imgGif.init(); if (conf['Image Hover']) imgHover.init(); - if (conf['Reveal Spoilers']) revealSpoilers.init(); if (conf['Report Button']) reportButton.init(); if (conf['Quote Inline']) quoteInline.init(); if (conf['Quote Preview']) quotePreview.init(); diff --git a/script.coffee b/script.coffee index 73f176090..5670b50d5 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 src thumb.src = src imgExpand = @@ -2811,15 +2811,15 @@ Main = if conf['Sauce'] sauce.init() + if conf['Reveal Spoilers'] + revealSpoilers.init() + if conf['Image Auto-Gif'] imgGif.init() if conf['Image Hover'] imgHover.init() - if conf['Reveal Spoilers'] - revealSpoilers.init() - if conf['Report Button'] reportButton.init()