go out Mozest directly

點擊直接打開 Mozest 論壇未經驗證的外部連結

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @author         shyangs
// @name           go out Mozest directly
// @description    點擊直接打開 Mozest 論壇未經驗證的外部連結
// @namespace      http://wiki.moztw.org/index.php/User:Shyangs
// @version        1.0
// @include        http://mozest.com/outgoing.php?u=*&c=*
// @include        http://board.mozest.com/*thread*
// @license        MIT License; http://opensource.org/licenses/mit-license.php
// ==/UserScript==
var regex=/^http:\/\/mozest\.com\/outgoing\.php\?u=(\S+?)&c=.*/;//http://mozest.com/outgoing.php?u=(Base64)&c=
var L=regex(location.href);//exec
if(L!==null){//自動跳轉
  location.href=atob(L[1]);//atob() 是把 Base64 資料轉回字串。 https://developer.mozilla.org/en/DOM/window.atob
}else{//連結處理
  var A=document.getElementsByTagName('a');
  var n=A.length;
  for(var i=0;i<n;i++){
    L=regex(A[i].href);
    if(L!==null){
      A[i].href=atob(L[1]);
    }
  }
}