User:Ricky Lau/monobook.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
//Edit first section
JSConfig.edit0Pos = 'top';
$(function(){
if ($('ca-edit-0')) { $('ca-edit-0').firstChild.innerHTML = '首段'; }
});
//Purge function
$(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('清除快取') );
var newLi = document.createElement( "li" );
newLi.style.marginLeft = "1.6em"
newLi.appendChild( newA );
var ul = ca_history.parentNode;
ul.appendChild( newLi );
}
});
//RAC - Rapid Add Content
//The tool MUST be used with prototype.js
document.write ('<scr' + 'ipt src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"></sc' + 'ript>');
//Exclude list for RAC, which RAC will collapse in listed page
importScript ('User:Ricky Lau/racExclude.js');
//Some RAC settings (ex: sig) here
importScript ('User:Ricky Lau/racMisc.js');
//RAC tools list
importScript ('User:Ricky Lau/racContent.js');
//RAC core, which should not be modified
importScript ('User:Ricky Lau/rac.js');
// fixWiki
importScript ('User:Ricky Lau/fixWiki.js');
//New Page Patroler
importScript ('User:Ricky Lau/npp.js');
//Lab
$(function(){
if (window.opener) {
document.body.insert (new Element ('div', { id: 'openerContent' }));
$('openerContent').update (window.opener.document.getElementById ('racContent').value);
}
});