SHARE
TWEET

Script for GIFs

a guest Nov 21st, 2017 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('document').ready(function () {
  2.     var animateGif = function () {
  3.         if ($(this).children('img.post-image').attr('src') != '/static/spoiler.png')
  4.             $(this).children('img.post-image').attr('src', $(this).attr('href'));
  5.     }
  6.    
  7.     $('div.file').children('a[href*=".gif"]').each(animateGif);
  8.     $(document).on('new_post', function (e, post) {
  9.         $(post).find('div.file').children('a[href*=".gif"]').each(animateGif);
  10.     });
  11. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top