您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Searches for links on GaiaOnline, then makes them open in the same window for on-site links and then alerts you based on the settings. This applies to user post.
// ==UserScript== // @name GaiaOnline Link Fixer V2 // @description Searches for links on GaiaOnline, then makes them open in the same window for on-site links and then alerts you based on the settings. This applies to user post. // @include http://gaiaonline.com/* // @include http://www.gaiaonline.com/* // @version 0.0.1.20140525024112 // @namespace https://gf.qytechs.cn/users/2178 // ==/UserScript== ///////////////////SETTINGS////////////////////// var cl="off" // alerts to leaving site with confirm box var wf="off" // alerts to leaving site with Gaia's warning frame ///////////////////////////////////////////////// if ( !(cl == "off") && !(cl == "on") || !(wf == "off") && !(wf == "on") ) { alert('GaiaOnline Link Fixer V2 says:\nInvalid setting you must use "on" or "off".'); } else { var redirect = "http://www.gaiaonline.com/gaia/redirect.php"; var atags = document.getElementsByTagName('a'); for (var x = 0; x < atags.length; x=x+1) { var atag = atags[x]; for (var y = 0; y < 2; y=y+1) { if (atag.href.substr(0,43) == redirect) { var url = atag.href.substr(46) if (url.substr(0,4)!='http'){ url='http://'+url; } atag.href = unescape(url); var gaia=atag.hostname for (i=0;i<=i+1;i++){ if(gaia.indexOf('.')!=gaia.lastIndexOf('.')){ gaia=document.domain.slice(document.domain.indexOf('.')+1) } else{ break; } } if (gaia == 'gaiaonline.com') { atag.removeAttribute('target'); } else { if (wf=="on") { atag.href = redirect + "?r=" + atag.href; } if (cl=="on") { atag.setAttribute('onclick',"if (confirm('Go to:\\n" + atag.href + "')==true) {return true;} else {return false;}"); } } } } } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址