User:Cdip150/common.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
if(location.protocol=="http:"){
location.replace((""+location).replace(/^http\:\/\// ,"https:\/\/"));
}
$( function(){
//改變編輯框字型
$("textarea").css({"font-size":"10pt","font-family":"細明體,MingLiU"}).each(function(){
this.rows=Math.floor(this.rows*0.9);
});
});
importScript('User:Cdip150/工具/介面/ConvertRefNoteTag.js');
// [[User:Bencmq/script/CheckUser.js]] 请保留此行注释
importScript('User:Bencmq/script/CheckUser.js');
if(mw.config.get("wgPageName")=="Wikipedia:新条目推荐/候选" && mw.util.getParamValue("botcount")==1) (function runVoteCount(){
if($("#mw-normal-catlinks").length<=0){
setTimeout(runVoteCount, 100);
return null;
}
$.post(
'/w/api.php',
{
action : 'query',
prop : 'revisions',
format : 'json',
titles : 'User:Cdip150-bot/votecount.js',
rvprop : 'content|timestamp',
},
null,
'json'
).done(
function(data){
var contentstr = '',
timestamp = '',
pageid = '',
lastrevid = -1;
for ( pageid in data.query.pages ) {
if(pageid<0){
timestamp = Math.floor(Date.now()/1000);
}else{
timestamp = data.query.pages[pageid].revisions[0].timestamp;
contentstr = data.query.pages[pageid].revisions[0]['*'];
lastrevid = data.query.pages[pageid].lastrevid;
}
break;
}
eval(""+contentstr);
}
);
})();