Advertisement
Guest User

Untitled

a guest
May 28th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name       GSY Img
  3. // @namespace  http://www.gamersyde.com/
  4. // @version    0.2
  5. // @description  masque les images dans le forum GSY
  6. // @match      http://www.gamersyde.com/forum*
  7. // @copyright  2014, Miguel
  8. // ==/UserScript==
  9.  
  10. var imgs = $('table.tableforum tr.tabRow1 td.tabCol2 img');
  11.  
  12. imgs.each(function(i, e) {
  13.     var img = $(e);
  14.    
  15.     img.attr('data-src', img.attr('src'));
  16.     img.attr('alt', 'Click to view');
  17.     img.attr('title', 'Click to view');
  18.     img.attr('src', 'images/stop.gif');
  19.     img.attr('width', '50');
  20.    
  21.     img.bind('click', function(event) {
  22.         var that = $(this);
  23.        
  24.         that.attr('src', that.attr('data-src'));
  25.         that.removeAttr('width');
  26.        
  27.         that.unbind('click');
  28.        
  29.         return false;
  30.     });
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement