跳转到内容

User:MilkyDefer/common.js

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

这是本页的一个历史版本,由MilkyDefer留言 | 贡献2021年4月16日 (五) 17:52 (试用)编辑。这可能和当前版本存在着巨大的差异。

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

	/*** Start editing here ***/

	// When you want to end your break?
	// no leading zeroes. (example: 9 - correct, 09 - incorrect)

	var date = { year: 2020, month: 4, day: 30};
	var time = { hours: 23, minutes: 59, seconds: 59 };

	/*** Stop editing here ***/
	
	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("Enforced wikibreak until "+enforcedBreakEnd.toLocaleString()
			+ "\n(now is "+currentDate.toLocaleString()+")\n\nBye!");
		mw.loader.using(["mediawiki.api", "mediawiki.user"]).then(function ()
		{
			new mw.Api().post(
			{
				action: 'logout',
				token: mw.user.tokens.get('csrfToken')
			}).done(function (data)
			{
				location = "//" + location.host + "/w/index.php?title="
					 + "Special:Userlogin&returnto=Wikipedia%3A首页";
			}).fail(function ()
			{
				console.log("logout failed")
			});
		});
	}
});
/*** END WIKIBREAK ENFORCER ***/

/*mw.loader.load('https://wikiplus-app.com/Main.js'); Temporarily disable WikiPlus*/

mw.loader.load( '//zh.wikipedia.org/w/index.php?title=User:和平奮鬥救地球/checklinks.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//zh.wikipedia.org/w/index.php?title=User:Vozhuo/Tool/MOSNUM_dates.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//www.wikidata.org/w/index.php?title=User:Csisc/StructuredCategories.js&action=raw&ctype=text/javascript' );