Mobile01 image shower collocate with AutoPagerize

可搭配AutoPagerize使用的Mobile01 image shower

当前为 2014-12-14 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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);