diff options
| author | Nebs <nebs@openmailbox.org> | 2014-09-26 00:30:23 -0500 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-09-26 13:10:14 +0200 |
| commit | b7592c3eecd5346851cfc0b1450e4a3c3b6bb543 (patch) | |
| tree | 3899930b8fb30d46d76365e142c267b5dd78457f | |
| parent | afbe945d838781a8a570521a85d855a28f048790 (diff) | |
Fixed unanimating gifs in the catalog
| -rw-r--r-- | js/no-animated-gif.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/no-animated-gif.js b/js/no-animated-gif.js index 7e777d87..45a55f97 100644 --- a/js/no-animated-gif.js +++ b/js/no-animated-gif.js @@ -13,7 +13,10 @@ */ function unanimate_gif(e) { - var c = $('<canvas class="post-image"></canvas>'); + if (active_page === "catalog") + var c = $('<canvas class="thread-image"></canvas>'); + else + var c = $('<canvas class="post-image"></canvas>'); $(e).parent().prepend(c); c.attr('width', $(e).width()); c.attr('height',$(e).height()); @@ -32,7 +35,7 @@ function unanimate_gif(e) { } function no_animated_gif() { - var anim_gifs = $('img.post-image[src$=".gif"]'); + var anim_gifs = $('img.post-image[src$=".gif"], img.thread-image[src$=".gif"]'); localStorage.no_animated_gif = true; $('#no-animated-gif>a').text(_('Animate GIFs')); $('#no-animated-gif>input').prop('checked', true); @@ -48,7 +51,7 @@ function animated_gif() { $('#no-animated-gif>input').prop('checked', false); } -if (active_page == 'thread' || active_page == 'index' || active_page == 'ukko') { +if (active_page == 'thread' || active_page == 'index' || active_page == 'ukko' || active_page == 'catalog') { $(function(){ var selector, event; if (window.Options && Options.get_tab('general')) { |
