您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Discuz论坛链接默认新链接打开,支持autopager和Super_preloader
当前为
// ==UserScript== // @name Open Discuz Link in new tab // @description Discuz论坛链接默认新链接打开,支持autopager和Super_preloader // @namespace Lkytal // @icon http://lkytal.qiniudn.com/ic.ico // @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?* // @exclude http://tieba.baidu.com/* // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js // @version 1.2.2 // @grant GM_xmlhttpRequest // @grant GM_addStyle // @grant unsafeWindow // ==/UserScript== if (window != window.top || window.document.title == "") { return; } var x = document.getElementById('atarget'); if( x ) { //x.click(); unsafeWindow.setatarget(1); } else { $('a[onClick="atarget(this)"]').attr("target", "_blank").removeAttr("onClick"); document.addEventListener('AutoPagerAfterInsert',function() { $('div[id*=apBreakStart]').last().nextAll().find('a[onClick="atarget(this)"]').attr("target", "_blank").removeAttr("onClick"); } ); document.addEventListener('Super_preloaderPageLoaded', function() { $('div.sp-separator').last().nextAll().find('a[onClick="atarget(this)"]').attr("target", "_blank").removeAttr("onClick"); } ); }