PIXNET Album Expander

By Gea-Suan Lin Last update Oct 27, 2008 — Installed 940 times.

There are 1 previous version of this script.

// ==UserScript==
// @name        PIXNET Album Expander
// @namespace   http://blog.gslin.org/plugins/pixnet-album-expander
// @description Expand PIXNET album
// @homepage    http://blog.gslin.org/plugins/pixnet-album-expander
// @include     http://*.pixnet.net/album/set/*
// ==/UserScript==

function album_expander($)
{
    $('img.thumb').removeAttr('width').removeAttr('height').each(function(i){
        var u = $(this).attr('src');
        u = u.replace(/thumb_/g, '');
        $(this).attr('src', u);
        });

    var e = $('.thumbBox, .thumbImg, .thumbImg > span').attr('width', 'auto').attr('height', 'auto');
    e.each(function(){
        this.style.setProperty('height', 'auto', 'important');
        this.style.setProperty('width', 'auto', 'important');
        });
}

function GM_wait()
{
    if (typeof unsafeWindow.jQuery == 'undefined')
        window.setTimeout(GM_wait, 100);
    else
        album_expander(unsafeWindow.jQuery);
}

var GM_JQ = document.createElement('script');
GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js';
GM_JQ.type = 'text/javascript';
document.getElementsByTagName("head")[0].appendChild(GM_JQ);

GM_wait();