User:Jane9306/common.js
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
$( function () {
/*! loadScripts v0.0.1 | SunAfterRain https://w.wiki/4pid | CC-BY-SA 3.0 */
var loadScripts = ( function () {
function j( u ) { mw.loader.load( u ); }
function c( u ) { mw.loader.load( u, "text/css" ); }
function jp( p ) { j( mw.util.getUrl( p, { action: "raw", ctype: "text/javascript" } ) ); }
function cp( p ) { c( mw.util.getUrl( p, { action: "raw", ctype: "text/css" } ) ); }
function main( ss ) { for ( var i in ss ) { var s = ss[ i ]; if ( s instanceof URL ) { if ( s.pathname.match( /\.js$/ ) ) { j( s.href ); } else if ( s.pathname.match( /\.css$/ ) ) { c( s.href ); } } else { if ( s.match( /\.js$/ ) ) { jp( s ); } else if ( s.match( /\.css$/ ) ) { cp( s ); } } } }
return main;
}() );
loadScripts( [
"User:Bluedeck/serve/blib-link.js",
"User:WhitePhosphorus/MagicRedirect.js",
new URL( "https://wikiplus-app.com/Main.js" ),
"User:YFdyh000/JWB.js/load.js",
"User:Vozhuo/Tool/MOSNUM dates.js",
"User:Alexander Misel/test2.js",
"User:94rain/js/Gadget-afchelper.js",
"User:和平奮鬥救地球/DisamAssist.js"
] );
$( "#searchInput" ).attr( "placeholder", "뭘 검색할까?" );
$( "#p-personal li#pt-userpage" ).after(
$( "<li>" )
.attr( {
"id": "pt-helps"
} )
.append(
$( "<a>").attr( {
"id": "pts-newpage",
"href": "/wiki/Special:最新頁面?hidepatrolled=1&dir=prev",
"title": "最新頁面"
} ).text( "巡" ),
"|",
$( "<a>").attr( {
"id": "pts-rtrc",
"href": "/wiki/Special:空白頁面/RTRC",
"title": "RTRC"
} ).text( "退" ),
"|",
$( "<a>").attr( {
"id": "pts-draft",
"href": "/wiki/Category:正在等待審核的草稿",
"title": "AFC"
} ).text( "審" ),
"|",
$( "<a>").attr( {
"id": "pts-sub",
"href": "/wiki/Special:前綴索引?prefix=Jane9306&namespace=2",
"title": "子頁面"
} ).text( "子" )
)
);
});
/*** BEGIN WIKIBREAK ENFORCER
From [[:en:Wikipedia:WikiProject User scripts/Scripts/WikiBreak Enforcer/script]]
$(document).ready(function() {
// 你的假期何时结束?
// 没有前导零,如 7 ~ 正确,但是 07 ~ 错误。
var date = { year: 2024, month: 1, day: 22};
var time = { hours: 16, minutes: 59, seconds: 59 };
var currentDate = new Date();
var enforcedBreakEnd = new Date(
date.year,date.month-1,date.day,time.hours,time.minutes,time.seconds);
if (currentDate <= enforcedBreakEnd) {
alert("您的維基假期將在"+enforcedBreakEnd.toLocaleString() + "結束"
+ "\n(現在是:"+currentDate.toLocaleString()+")\n\n再見!");
location = "//"+location.host+"/w/index.php?title="
+ "Special:Userlogout&returnto=Main_Page";
}
});
END WIKIBREAK ENFORCER ***/
// [[File:Krinkle_Global_SUL.js]]
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Krinkle/Tools/Global_SUL.js&action=raw&ctype=text/javascript');