M01 Auto Page Fix Img

身為一位阿宅,常逛M01是天經地義的事,雖有AutoPagerize加持
但還是美中不足,遇上圖片多的文章還是不夠方便,故開發此script加強之,讚!!

// ==UserScript==
// @name           M01 Auto Page Fix Img
// @description    AutoPage後,自動載入圖片
// @include        https://www.mobile01.com/*
// @include        http://www.mobile01.com/*
// ==/UserScript==
var i = 0;
function AP(event) {
    var n = event.target;
    if (n.tagName == 'DIV') {
        if (i < document.getElementsByClassName('forum_content_main').length) {
            unsafeWindow.LoadAttachImage();
            i = document.getElementsByClassName('forum_content_main').length
        }
    }
}
window.addEventListener("DOMNodeInserted", AP, false);

Update : 2010/10/19
// ==UserScript==
// @name           M01 Auto Page Fix Img
// @description    AutoPage後,自動載入圖片
// @include        http://www.mobile01.com/topicdetail.php?f=*
// @include        https://www.mobile01.com/topicdetail.php?f=*
// ==/UserScript==
window.addEventListener("AutoPagerize_DOMNodeInserted", function(){unsafeWindow.LoadAttachImage();}, false);

DOM events - Wikipedia
Gecko-Specific DOM Events - MDC
event.target - MDC
element.addEventListener - MDC
Mobile01 image shower collocate with AutoPagerize

相關文章:
AutoPagerize DOM Event
M01 Auto Load Img