MyWiki:WikiProject User scripts/Scripts/WikiBreak Enforcer
Jump to navigation
Jump to search
WikiBreak Enforcer is a script that prevents a user from logging in before a certain date, to help enforce a wikibreak. If the user logs in, they are automatically logged back out, but can still view or edit from the mobile interface, or as a logged out user through their IP address.
How to Use
| Error creating thumbnail: File missing | Warning! Be careful not to make a mistake, or you may not be able to get back in at the end of your break. In cases of errors, an interface admin can remove the script from your user JavaScript page for you. |
- Copy the code under Script below between
/*** BEGIN WIKIBREAK ENFORCER ***/and/*** END WIKIBREAK ENFORCER ***/. - Paste the code on your user JavaScript page, and then change the lines starting with
var dateandvar timeto reflect the time you want your break to end (local time). Thevar dateline defines the date your break will end, while thevar timedefines the time on that day that your break will end. For example, for a break ending at 8:22 pm on 6 February 2019, one would enter the settings:var date = { year: 2019, month: 2, day: 6 }; var time = { hours: 20, minutes: 22, seconds: 0 };
- Save the edited user JavaScript page.
- Purge the page. If successful, you will be logged out.
- That's it: enjoy your wikibreak! 🙂
Script
{{Wikipedia:WikiProject User scripts/Scripts/WikiBreak Enforcer/script.js}}