Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name expandImgFix
- // @namespace *
- // @description Fixed FF behaviour on 410chan.ru when ImgLikeOpera is installed
- // @include http://410chan.ru/*
- // @include http://*.410chan.ru/*
- // ==/UserScript==
- unsafeWindow.expandimg = function (postId, fullSrc, thumbSrc, fullWidth, fullHeight, thumbWidth, thumbHeight) {
- element = document.getElementById("thumb" + postId).children[0];
- if (element.src == thumbSrc) {
- element.setAttribute('src', fullSrc);
- element.setAttribute('ilo-full-src', fullSrc);
- element.setAttribute('alt', postId);
- element.setAttribute('width', fullWidth);
- element.setAttribute('height', fullHeight);
- } else {
- element.setAttribute('src', thumbSrc);
- element.setAttribute('ilo-full-src', thumbSrc);
- element.setAttribute('alt', postId);
- element.setAttribute('width', thumbWidth);
- element.setAttribute('height', thumbHeight);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement