bbs archiver to thread

从搜索引擎搜索到discuz的页面,有时默认是一个简化版本(见Description部分的栗子表)。使用这个js之后,左上方悬浮一个‘完整版本’链接。可以通过设置var autoload=1,打开页面时自动打开完整版本(支持phpwind和discuz)

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

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

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        bbs archiver to thread
// @namespace   http://userscripts.org/users/tumuyan
// @include     http://*archiver/tid*
// @include     http:*/simple/*
// @version     2.3
// @description 从搜索引擎搜索到discuz的页面,有时默认是一个简化版本(见Description部分的栗子表)。使用这个js之后,左上方悬浮一个‘完整版本’链接。可以通过设置var autoload=1,打开页面时自动打开完整版本(支持phpwind和discuz)
// ==/UserScript==


var autoload=0

if (document.getElementById("end")){
    var endbot=document.getElementById("end").getElementsByTagName("a")
        if (endbot[0].href.match(/thread.{0,30}html/)) 
            add(endbot[0])
}
else if(document.getElementsByTagName("center"))
{ 
    var elepb85=document.getElementsByTagName("center")
      
    for (var i=elepb85.length-1;i>-1;i--)
    {
        var titlebot=elepb85[i].getElementsByTagName("b") 
            if ( titlebot[0].innerHTML.match(/^\s*查看完整版本.*/) )
             {
                 var endbot=titlebot[0].getElementsByTagName("a")  
				 add(endbot[0])
                 exit
               }  
    }

}
 

    
function add(endbot)
    
{   endbot.id="fulltextbot"
	endbot.innerHTML="完整版本" 
    if (autoload)
      endbot.click()
	  
var cssbot = document.createElement("style");
    cssbot.type="text/css";
    cssbot.innerHTML = ' a#fulltextbot {color:#336 !important;  position:fixed !important;display:block !important;  padding:4px !important;border-radius:0px 12px 12px 0px;  width:16px !important;max-height:120px !important;overflow:hidden !important;  top:40px;left:-2px;font-size: 12px !important;line-height: 30px !important;  background:#eed !important;box-shadow:5px 3px 6px #bbb  ;-o-transition: .3s ease-in;-moz-transition: .3s ease-in;-webkit-transition: .3s ease-in;}      a#fulltextbot:hover    {background:#fdd !important;box-shadow:4px 4px 5px #bcd;  -o-transition: .3s ease-in;-moz-transition: .3s ease-in;-webkit-transition: .3s ease-in;} ';
    document.head.appendChild(cssbot);   
}