User:冰霜葵/monobook.js

维基百科,自由的百科全书

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。

importScript('User:Bencmq/NPP.js');
importScript('User:Bencmq/Mass_rollback.js');
importScript('User:Bencmq/rollbackSummary.js');
importScript('User:PhiLiP/wikicache/load.js');

//==Hide New Message Begin==
function HWFU(){
        var divs = document.getElementsByTagName("div");
        var us = [];
        var u;
        for (i = 0, l = divs.length; i < l; i++) {
                if ( /(^|\s)usermessage(\s|$)/.test(divs[i].className) ) {
                        u = divs[i];
                        var uas = u.getElementsByTagName("a");
                        if (uas.length>1) {
                                if (uas[1].href.substr(-8)!=="diff=cur" || /(^|\s)external(\s|$)/.test(uas[1].className)) {
                                        u.style.display = "none";
                                }
                        } else {
                                u.style.display = "none";
                        }
                }
        }
}
if (window.addEventListener) {
        window.addEventListener("load", HWFU, false);
} else if (window.attachEvent) {
        window.attachEvent("onload", HWFU);
}
//==強迫更新 Begin==
$(function(){
        var ca_history = document.getElementById( "ca-history" );
        if ( ca_history && document.location.href.indexOf(mw.config.get('wgServer')+mw.config.get('wgArticlePath').replace("$1","")) == 0 ){
                var newA = document.createElement( "a" );
                newA.setAttribute( "href" , ca_history.firstChild.href.replace( "=history" , "=purge" ) );
                newA.appendChild( document.createTextNode( wgULS('↺','↺') ) );
                var newLi = document.createElement( "li" );
                newLi.appendChild( newA );
                var ul = ca_history.parentNode;
                ul.appendChild( newLi );
        }
})

//==Friendly==
//importScript('User:Jimmy_xu_wrk/Friendly/main.js');
//if( typeof( FriendlyConfig) == 'undefined' ) FriendlyConfig= {};
//FriendlyConfig.markCopyvioAsMinor = true;
//FriendlyConfig.summaryAd = "。";
 
//==Hotcat Setups==
JSconfig.keys['HotCatListSize'] = 10;