Greasy Fork is available in English.

bbs网址标准化

www.tvboxnow.com(公仔箱)、www.city9x.com(城市风情)、141hongkong.com、www.hd1080.org网址标准化

Tính đến 03-02-2015. Xem phiên bản mới nhất.

// ==UserScript==
// @name       bbs网址标准化
// @description  www.tvboxnow.com(公仔箱)、www.city9x.com(城市风情)、141hongkong.com、www.hd1080.org网址标准化
// @include     http://www.tvboxnow.com/forum*
// @include     http://www.city9x.com/bbs/forumdisplay.php?fid=*
// @include     http://141hongkong.com/home.php?mod=*
// @include     http://141hongkong.com/forum-*
// @include     http://141hongkong.com/forum.php?mod=forumdisplay&fid=*
// @include     http://www.hd1080.org/forum.php?mod=forumdisplay&fid=*
// @include     http://youiv.net/forum-*
// @include     http://youiv.net/forum.php?mod=forumdisplay*
// @include     http://www.cnxici8.com/thread*
// @version     1.4
// @author      Youngcc
// @grant       none


// @namespace https://greasyfork.org/users/8717
// ==/UserScript==


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  加载成功显示图标
var af=document.createElement("link");
af.rel="stylesheet";
af.href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css";
document.head.appendChild(af);
var tp=document.createElement("span");
tp.className="fa fa-chevron-circle-up fa-4x top";
tp.setAttribute("style","cursor: pointer; opacity:0; position: fixed; Left: 30px; bottom: 40px; transition: opacity 0.01s;z-index: 999999;color:#32CD32;");
document.body.appendChild(tp);

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   加载成功显示图标


//~~~~~~~~~~ 判断初始化
var wz = location.href
var value = "";
var panduan = "";
//~~~~~~~~~~ 判断初始化

       
    
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~公仔箱+城市风情
    if (wz.indexOf("http://www.tvboxnow.com/forumdisplay.php")!=-1||wz.indexOf("city9x")!=-1 ) 
    { 
    var el = [],
        _el = document.getElementsByTagName('a');
    for (var i=0; i<_el.length; i++ ) {
    var str = _el[i].href
        if (str.indexOf("viewthread.php?tid=")!=-1  )  
        { value = _el[i].href;             
         var re = /viewthread.php\?tid\=([^\&]*)/i;
            var r = value.match(re);
            value = r[1];
_el[i].href= "viewthread.php?tid="+value
panduan = "1"
        }
    } 
    if (panduan != ""  )  
        {    
document.querySelector("span.top").style.opacity=1; 
         }
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~公仔箱+城市风情
// ~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~公仔箱+141+youiv.net
    if (wz.indexOf("www.tvboxnow.com/forum-")!=-1||wz.indexOf("141hongkong.com")!=-1 ) 
    {
    var el = [],
        _el = document.getElementsByTagName('a');
    for (var i=0; i<_el.length; i++ ) {
    var str = _el[i].href
        if (str.indexOf("thread-")!=-1  ) 
        { value = _el[i].href;             
         var re = /thread\-([^\-]*)/i;
            var r = value.match(re);
            value = r[1];
_el[i].href= "viewthread.php?tid="+value
panduan = "1"
        }
    } 
    if (panduan != ""  )  
        {    
document.querySelector("span.top").style.opacity=1; 
         }
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~公仔箱箱+141+youiv.net
// ~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~hd1080
    if (wz.indexOf("hd1080")!=-1) 
    {
    var el = [],
        _el = document.getElementsByTagName('a');
    for (var i=0; i<_el.length; i++ ) {
    var str = _el[i].href
        if (str.indexOf("viewthread&tid=")!=-1  )  
        { value = _el[i].href;             
         var re = /viewthread\&tid\=([^\&]*)/i;
            var r = value.match(re);
            value = r[1];
_el[i].href= "forum.php?mod=viewthread&tid="+value
panduan = "1"
        }
    } 
    if (panduan != ""  )  
        {    
document.querySelector("span.top").style.opacity=1; 
         }
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~hd1080
// ~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~youiv.net
    if (wz.indexOf("youiv.net/forum.php?")!=-1) 
    {
    var el = [],
        _el = document.getElementsByTagName('a');
    for (var i=0; i<_el.length; i++ ) {
    var str = _el[i].href
        if (str.indexOf("forum.php?mod=viewthread&tid=")!=-1 ) 
        { value = _el[i].href;   
        value = value.substr(46, 6)
_el[i].href=  "forum.php?mod=viewthread&tid=" + value 
panduan = "1"
        }
    } 
    if (panduan != ""  )  
        {    
document.querySelector("span.top").style.opacity=1; 
         }
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~youiv.net
// ~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~youiv.net 2
    if (wz.indexOf("youiv.net/forum-")!=-1) 
    {
    var el = [],
        _el = document.getElementsByTagName('a');
    for (var i=0; i<_el.length; i++ ) {
    var str = _el[i].href
        if (str.indexOf("thread-")!=-1 ) 
        { value = _el[i].href;             
         var re = /thread\-([^\-]*)/i;
            var r = value.match(re);
            value = r[1];
_el[i].href= "forum.php?mod=viewthread&tid=" + value
panduan = "1"
        }
    } 
    if (panduan != ""  )  
        {    
document.querySelector("span.top").style.opacity=1; 
         }
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~youiv.net 2   
// ~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~性吧
    if (wz.indexOf("www.cnxici8.com/thread")!=-1) 
    {
    var el = [],
        _el = document.getElementsByTagName('a');
    for (var i=0; i<_el.length; i++ ) {
    var str = _el[i].href
        if (str.indexOf("read-htm-tid")!=-1 ) 
        { value = _el[i].href;   
        value = value.substr(36, 7)
_el[i].href=  "read.php?tid=" + value 
panduan = "1"
        }
    } 
    if (panduan != ""  )  
        {    
document.querySelector("span.top").style.opacity=1; 
         }
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~性吧


window.onload = get