Open Discuz Link in new tab

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

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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.2
// @icon					http://lkytal.qiniudn.com/ic.ico
// @grant					unsafeWindow
// @run-at					document-end
// @license                             AGPL
// @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();
		}
	);*/
}