Misplaced Pages

User:Lovkal/common.js: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Lovkal Browse history interactively← Previous editNext edit →Content deleted Content added
Revision as of 14:06, 4 April 2024 view sourceLovkal (talk | contribs)Extended confirmed users, New page reviewers, Pending changes reviewers7,385 editsNo edit summary← Previous edit Revision as of 13:31, 5 April 2024 view source Xaosflux (talk | contribs)Edit filter managers, Autopatrolled, Bureaucrats, Importers, Interface administrators, Oversighters, Administrators83,930 edits user reqTag: ReplacedNext edit →
Line 1: Line 1:
/* Cleared on request of user */
importScript('User:Lourdes/PageCuration.js'); // Linkback: ]
importScript( 'User:Evad37/MoveToDraft.js' ); // Backlink: ]

importScript('User:Evad37/rater.js'); // ]

importScript('User:P999/Toggle_VF.js'); // ]

$(document).ready(function()
{

/*** Start editing here ***/

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

var date = { year: 2024, month: 4, day: 12};
var time = { hours: 10, minutes: 01, seconds: 0 };

/*** 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().then(function ()
{
new mw.Api().post(
{
action: 'logout',
token: mw.user.tokens.get('csrfToken')
}).done(function (data)
{
location = "//" + location.host + "/search/?title="
+ "Special:Userlogin&returnto=Main_Page";
}).fail(function ()
{
console.log("logout failed")
});
});
}
});

Revision as of 13:31, 5 April 2024

/* Cleared on request of user */