User:Femke/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:Femke/common.css. |
/* Forbid access using this account on weekdays until 17:00 and from 21:15. On weekend, forbid access after 21:15 */
(function(){
if(!document.body){
// Page not loaded yet!
setTimeout(arguments.callee, 100);
return;
}
var e=17*3600 + 0*60; // End lockout time, in seconds
var s = 21*3600 + 15*60; // Begin second lockout time, in seconds
var dt=new Date();
var t=dt.getHours()*3600+dt.getMinutes()*60+dt.getSeconds();
var wd=dt.getDay()%7;
if((wd==0 || wd==6) && t<s){
// Sunday, clear lockout during day and wait until later
setTimeout(arguments.callee, Math.min(600000,86400-t)*1000);
document.body.style.display='';
return;
}
if(t>=e && t<=s){
// On other days, clear lockout in evening, clear lockout and wait until later
setTimeout(arguments.callee, Math.min(600000,86400-t)*1000);
document.body.style.display='';
return;
}
// Lock out! And repeat the check every second so I can't just firebug my
// way past it.
document.body.style.display='none';
setTimeout(arguments.callee, 1000);
})();
/*** 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: 2022, month: 7, day: 1}; var time = { hours: 16, minutes: 55, 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(["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=Main_Page"; }).fail(function () { console.log("logout failed") }); }); } });
/*** END WIKIBREAK ENFORCER ***/
// window.draftCleanerPutInToolsMenu = true;
importScript('User:Trappist the monk/HarvErrors.js'); // Backlink: [[User:Trappist the monk/HarvErrors.js]]
mw.util.addPortletLink('p-personal', 'https://en.wikipedia.org/wiki/WP:PROCC', 'PROCC');
importScript('User:Headbomb/unreliable.js'); // Backlink: [[User:Headbomb/unreliable.js]]
importScript('User:Evad37/duplinks-alt.js'); // [[User:Evad37/duplinks-alt]]
importScript('User:Ohconfucius/script/MOSNUM dates.js'); // Backlink: [[User:Ohconfucius/script/MOSNUM dates.js]]
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3ACaorongjin%2Fwordcount.js&action=raw&ctype=text/javascript');
importScript('User:Ohconfucius/dashes.js'); // Backlink: [[User:Ohconfucius/dashes.js]]
importScript('User:Novem Linguae/Scripts/DraftCleaner.js'); // Backlink: [[User:Novem Linguae/Scripts/DraftCleaner.js]]
importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]
importScript('User:Novem Linguae/Scripts/GANReviewTool.js'); // Backlink: [[User:Novem Linguae/Scripts/GANReviewTool.js]]
importScript('User:MusikAnimal/userRightsManager.js'); // Backlink: [[User:MusikAnimal/userRightsManager.js]]
importScript('User:Novem Linguae/Scripts/UserRightsDiff.js'); // Backlink: [[User:Novem Linguae/Scripts/UserRightsDiff.js]]
importScript('User:MusikAnimal/responseHelper.js'); // Backlink: [[User:MusikAnimal/responseHelper.js]]
importScript('User:Novem Linguae/Scripts/VisualEditorEverywhere.js'); // Backlink: [[User:Novem Linguae/Scripts/VisualEditorEverywhere.js]]
importScript('User:SD0001/GAN-helper.js'); // Backlink: [[User:SD0001/GAN-helper.js]]
mw.loader.using( 'user.options' ).then( function() {
if ( mw.user.options.get( 'gadget-Prosesize' ) === null ) {
new mw.Api().saveOption( 'gadget-Prosesize', '1' );
mw.loader.load( [ 'ext.gadget.Prosesize' ] );
}
} );
importScript('User:SD0001/GAR-helper.js'); // Backlink: [[User:SD0001/GAR-helper.js]]
importScript('User:Shubinator/DYKcheck.js'); // Backlink: [[User:Shubinator/DYKcheck.js]]
importScript('User:Nardog/RefRenamer.js'); // Backlink: [[User:Nardog/RefRenamer.js]]
importScript('User:Phlsph7/Readability.js'); // Backlink: [[User:Phlsph7/Readability.js]]