User:R'n'B/vector-2022.js

var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], today = new Date, yesterday = new Date(today.getTime - 24*60*60*1000), tomorrow = new Date(today.getTime + 24*60*60*1000);

// User:Lupin/popups.js /* popupNavLinkSeparator = ' &middot; '; popupShortcutKeys = true; // optional: enable keyboard shortcuts popupOnEditSelection = false; popupRedirAutoClick = 'wpDiff'; imagePopupsForImages = false; popupDabRegexp = '(([{][{]\\s*(([-\\w\\s]*disamb[-\\w\\s]*)'                           + '|(bio|fish-|geo|math)?dab'                            + '|(callsign|(geo-?)|hn|hospital|number|pow|(road?)|school)dis'                            + '|hndis-cleanup|na broadcast list'                            + ')(\\s*\\|[^}]*)?\\s*[}][}]' + ')|(is a .*disambiguation.*page))'; popupMaxWidth = 512; popupAdminLinks = true;  // optional: enable admin links popupFixDabs = true; popupFixRedirs = true;

mw.loader.using( 'mediawiki.util' ).then( function {	var loadParamsJS = {		action: 'raw',		ctype: 'text/javascript'	};	var loadScript = function (page) {		mw.loader.load( mw.util.getUrl( page, loadParamsJS ));	};	var loadParamsCSS = {		action: 'raw',		ctype: 'text/css'	};	var loadStylesheet = function (page) {		mw.loader.load( mw.util.getUrl( page, loadParamsCSS ), 'text/css');	};

loadScript("User:Lupin/recent2.js"); //	loadScript("User:Barticus88/WhatLinksHere.js"); loadScript("User:R'n'B/wrappi.js"); loadScript('User:Midas02/DisamAssist.js'); // Backlink: User:Midas02/DisamAssist.js

// add a "Dab solver" link to the toolbar -- DISABLED //	jQuery(document).ready(function { //	   if( mw.config.get('wgIsArticle') ){    // only add toolbox link on actual pages //	        var dabsolverUrl = 'http://69.142.160.183/~dispenser/cgi-bin/dab_solver.py?page=' + mw.config.get('wgPageName'); //	        mw.util.addPortletLink('p-tb', dabsolverUrl, 'Dab solver', 't-dabsolve', "Invoke Dab Solver on this page"); //	    }

var begin = function { if (! mw.RnB) { setTimeout(begin, 100); return; }		if ( mw.config.get('wgPageName') === "User:R'n'B/missingredirapp") { loadScript("User:R'n'B/missingredirapp.js"); }		if ( mw.config.get('wgPageName') === "User:R'n'B/birthdeath") { loadScript("User:R'n'B/birthdeath.js"); }		if ( mw.config.get('wgPageName').slice(0, 42) === "User:RussBot/Non-disambiguation_redirects/") { loadScript("User:R'n'B/ndr.js"); }		if ( mw.config.get('wgPageName') === "Wikipedia:Disambiguation_pages_with_links/" +				months[today.getUTCMonth] + "_" + today.getUTCFullYear.toString ||	           mw.config.get('wgPageName') === "Wikipedia:Disambiguation_pages_with_links/" +				months[yesterday.getUTCMonth] + "_" + yesterday.getUTCFullYear.toString ||	            mw.config.get('wgPageName') === "Wikipedia:Disambiguation_pages_with_links/" +				months[tomorrow.getUTCMonth] + "_" + tomorrow.getUTCFullYear.toString	           ) { loadScript("User:R'n'B/dplupdate.js"); }		if ( mw.config.get('wgPageName') === "Special:Watchlist" ) { mw.util.addPortletLink( 'p-tb', '#', 'Toggle all changes', 'wl-toggle-all' ); $('#wl-toggle-all').click( function (e) {				e.preventDefault;				$('.mw-collapsible-toggle').click;			}); }	   if ( mw.config.get('wgPageName') === "User:R'n'B/cats_in_backlinks" ) { loadScript("User:R'n'B/cats_in_backlinks.js"); return; }	   if ( mw.config.get('wgPageName') === "User:R'n'B/common_backlinks" ) { loadScript("User:R'n'B/common_backlinks.js"); return; }	   loadScript("User:R'n'B/dabcolorizer.js"); loadStylesheet("User:R'n'B/tdd.css"); loadScript("User:R'n'B/tdd.js"); };	begin; });