Mobile01 image shower collocate with AutoPagerize

可搭配AutoPagerize使用的Mobile01 image shower

目前為 2014-12-14 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name           Mobile01 image shower collocate with AutoPagerize
// @namespace      MA
// @description    可搭配AutoPagerize使用的Mobile01 image shower
// @include        https://www.mobile01.com/topicdetail.php*
// @include        http://www.mobile01.com/topicdetail.php*
// @include        https://www.mobile01.com/waypointtopicdetail.php*
// @include        http://www.mobile01.com/waypointtopicdetail.php*
// @version        0.02
// ==/UserScript==

function LoadAttachImage()
{
	var img,i,imgLength;

	img=document.getElementsByName('attachimg');
	imgLength=img.length;
	for(i=0;i<imgLength;i++)
	{
		img[0].innerHTML='<img src="http://attach.mobile01.com/attach/'+img[0].id+'" border="0">';
		img[0].removeAttribute('name');
	}

	img=document.getElementsByName('waypointimg');
	imgLength=img.length;
	for(i=0;i<imgLength;i++)
	{
		img[0].innerHTML='<img src="http://attach.mobile01.com/waypoint/'+img[0].id+'" border="0">';
		img[0].removeAttribute('name');
	}
}
//以下兩行感謝shyangs at ptt.cc的提供XDD
LoadAttachImage();
window.addEventListener('AutoPagerize_DOMNodeInserted',function(){LoadAttachImage();},false);