Open Discuz Link in new tab

Discuz论坛链接默认新链接打开,支持autopager和Super_preloader等

当前为 2014-08-20 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name					Open Discuz Link in new tab
// @description				Discuz论坛链接默认新链接打开,支持autopager和Super_preloader等
// @include					http://*/forum-*-*
// @include					http://*/forum-*-*.html
// @include					http://*/showforum-*.html
// @include					http://*/forum.php?mod=forumdisplay*
// @include					http://*/forum/viewforum.php?f=*
// @include					http://*/forum/search.php?*
// @include					https://*/forum-*-*
// @include					https://*/forum-*-*.html
// @include					https://*/showforum-*.html
// @include					https://*/forum.php?mod=forumdisplay*
// @include					https://*/forum/viewforum.php?f=*
// @include					https://*/forum/search.php?*
// @namespace				Lkytal
// @author					lkytal
// @homepage				http://coldfire.qiniudn.com/
// @version					1.3.1
// @icon					http://lkytal.qiniudn.com/ic.ico
// @grant					unsafeWindow
// @run-at					document-end
// @homepageURL				https://git.oschina.net/coldfire/GM
// ==/UserScript==

var x = document.getElementById("atarget");

if (x)
{
	//x.click();
	unsafeWindow.setatarget(1);
}
else
{
	var AFile = document.querySelectorAll('#threadlist tbody a');

	for (var i = AFile.length - 1; i > -1; i--)
	{
		AFile[i].setAttribute("target", "_blank");
	}

	/*document.addEventListener('DOMNodeInserted',function()
		{
			LinkNew();
		}
	);*/
}