FDZ ScrollTo Attach

// ==UserScript==
// @name           FDZ ScrollTo Attach
// @description    開啟主題後,自動捲動至附件
// @include        http://forum.*.fdzone.org/viewthread.php?tid=*
// @include        http://forum.fdzone.org/viewthread.php?tid=*
// ==/UserScript==
function doit()
{
    window.scrollTo(0,document.getElementsByClassName('t_attachlist')[0].offsetTop);
}
window.addEventListener ("DOMContentLoaded", doit, false);

Note: window.addEventListener ("load", doSomething, false); //load事件的觸發要等網頁全部圖片、檔案下載完畢才會執行
window.addEventListener ("DOMContentLoaded", doSomething, false); //DOMContentLoaded事件的觸發不必等到圖片、檔案等下載完畢,就會執行
window.scrollTo(0,element.offsetTop); //垂直捲動網頁至element
DOMContentLoaded