Advertisement
Guest User

Untitled

a guest
Jul 12th, 2011
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           expandImgFix
  3. // @namespace *
  4. // @description    Fixed FF behaviour on 410chan.ru when ImgLikeOpera is installed
  5. // @include        http://410chan.ru/*
  6. // @include        http://*.410chan.ru/*
  7. // ==/UserScript==
  8.  
  9. unsafeWindow.expandimg = function (postId, fullSrc, thumbSrc, fullWidth, fullHeight, thumbWidth, thumbHeight) {
  10.     element = document.getElementById("thumb" + postId).children[0];
  11.     if (element.src == thumbSrc) {
  12.         element.setAttribute('src', fullSrc);
  13.         element.setAttribute('ilo-full-src', fullSrc);
  14.         element.setAttribute('alt', postId);
  15.         element.setAttribute('width', fullWidth);
  16.         element.setAttribute('height', fullHeight);
  17.     } else {
  18.         element.setAttribute('src', thumbSrc);
  19.         element.setAttribute('ilo-full-src', thumbSrc);
  20.         element.setAttribute('alt', postId);
  21.         element.setAttribute('width', thumbWidth);
  22.         element.setAttribute('height', thumbHeight);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement