Jump to content

User:Sam Sailor/global.js

From Meta, a Wikimedia project coordination wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// VARIOUS
if ( mw.config.get( 'wgAction' ) === 'purge' ) { $('form[action*="action=purge"]').submit(); }
if (['enwiki'].indexOf(mw.config.get('wgDBname')) === -1) { mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/TwinkleGlobal/load.js&action=raw&ctype=text/javascript'); }
if (['enwiki'].indexOf(mw.config.get('wgDBname')) === -1) { mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:TenWhile6/XReport.js&action=raw&ctype=text/javascript'); }
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Rublov/anonymize.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:DannyS712/Easy-link.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Xover/EasyLinks.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:BrandonXLF/FloatHead.js&action=raw&ctype=text/javascript');
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js');
mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Sam_Sailor/MyMoreMenu.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/load.php?modules=ext.gadget.Navigation_popups');
mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navpop.css&action=raw&ctype=text/css', 'text/css');
window.popupStructure = 'menus';
window.popupNewWindows = true;
window.popupRevertSummaryPrompt = true;
window.popupFixDabs = true;
window.popupDabsAutoClick = 'wpPreview';
window.popupFixRedirs = true;
window.popupRedirAutoClick = 'wpDiff';
window.popupRedlinkRemoval = true;
window.popupRedlinkAutoClick = 'wpDiff';
mw.loader.load('//test.wikipedia.org/w/index.php?title=User:Sam_Sailor/test.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Aaron_Liu/Watchlyst_Greybar_Unsin.js&action=raw&ctype=text/javascript');
// SPECIAL PAGES
if (mw.config.get('wgCanonicalNamespace') === 'Special') {
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Lenore/autolink.js&action=raw&ctype=text/javascript');
	// CONTRIBUTIONS
	if (mw.config.get('wgCanonicalSpecialPageName') === 'Contributions') {
		// 
	} // END CONTRIBUTIONS
	// LOG
	} else if (mw.config.get('wgCanonicalSpecialPageName') === 'Log') {
		// 
	// END LOG
	// MOVEPAGE
	} else if (mw.config.get('wgCanonicalSpecialPageName') === 'MovePage') {
		// 
	// END MOVEPAGE
	// RECENTCHANGES
	} else if (mw.config.get('wgCanonicalSpecialPageName') === 'RecentChanges') {
		// 
	// END RECENTCHANGES
	// SEARCH
	} else if (mw.config.get('wgCanonicalSpecialPageName') === 'Search') {
		// 
	// END SEARCH
	// USERRIGHTS
	} else if (mw.config.get('wgCanonicalSpecialPageName') === 'UserRights') {
		// 
	// END USERRIGHTS
	// WATCHLIST
	} else if (mw.config.get('wgCanonicalSpecialPageName') === 'Watchlist') {
		// 
	// END WATCHLIST
	// WHATLINKSHERE
	} else if (mw.config.get('wgCanonicalSpecialPageName') === 'WhatLinksHere') {
		mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:He7d3r/Tools/AddActionLinks.js&action=raw&ctype=text/javascript');
		mw.loader.load('//www.wikidata.org/w/index.php?title=MediaWiki:Linkscount.js&action=raw&ctype=text/javascript');
	// END WHATLINKSHERE
// END SPECIAL PAGES
} else {
// Load scripts that should not load on a special page
// NOT SPECIAL
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Amorymeltzer/articleinfo-gadget.js&action=raw&ctype=text/javascript');
	mw.loader.load('//he.wikipedia.org/w/load.php?modules=ext.gadget.autocomplete');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Theopolisme/Scripts/autocompleter.js&action=raw&ctype=text/javascript');
	mw.loader.load('//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Sam_Sailor/Scripts/autoFormatterSettings.js&action=raw&ctype=text/javascript');
	mw.loader.load('//de.wikipedia.org/w/index.php?title=Benutzer:TMg/cleanDiff.js&action=raw&ctype=text/javascript');
	mw.loader.load('//commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:The_Earwig/copy-section-link.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Writ_Keeper/Scripts/deletionFinder.js&action=raw&ctype=text/javascript');
	//mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Alexis_Jazz/Factotum.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Eizen/LastEditor.js&action=raw&ctype=text/javascript');
	window.LastEditorOptions = {
		namespaces: [0, 1, 2, 3, 4, 5, 10, 14, 118]
	};
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Eizen/PageCreator.js&action=raw&ctype=text/javascript');
	window.PageCreatorOptions = {
		namespaces: [0, 1, 2, 3, 4, 5, 10, 14, 118],
    useUTC: true
  };
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:PerfektesChaos/js/pageLinkHelper/r.js&action=raw&bcache=1&maxage=604800&ctype=text/javascript', 'text/javascript');
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Sam_Sailor/regex.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:PleaseStand/subsearch.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Js/urldecoder.js&action=raw&ctype=text/javascript');
// END NOT SPECIAL
// ARTICLES AND DRAFTS
if (mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118) {
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:PerfektesChaos/js/lintHint/r.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/quick-before.js&action=raw&ctype=text/javascript');
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Mesidast/Tidy_citations.js&action=raw&ctype=text/javascript');
	mw.loader.using(["mediawiki.util"], function () {
    mw.util.addPortletLink("p-tb", "//www.wikidata.org/wiki/Special:Search?search=" + encodeURIComponent(mw.config.get("wgPageName")), "Wikidata search", "t-wikidatasearch", "Search the page name in Wikidata", null, "#t-wikibase");
	});
} // END ARTICLES AND DRAFTS
// ARTICLES AND TALK
if ((mw.config.get('wgNamespaceNumber') === 0) || (mw.config.get('wgNamespaceNumber') === 1)) {
	// 
} // END ARTICLES AND TALK
// ARTICLES
if (mw.config.get('wgNamespaceNumber') === 0) {
	//mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Fred_Gandt/sectionLinks.js&action=raw&ctype=text/javascript');
// END ARTICLES
} else {
// ANYWHERE BUT ARTICLES
// PROJECT SPACE
if (mw.config.get('wgNamespaceNumber') === 4) {
	//
// END PROJECT SPACE
// USER SPACE AND USER TALK SPACE
} else if ((mw.config.get('wgNamespaceNumber') === 2) || (mw.config.get('wgNamespaceNumber') === 3)) {
	// CVNSimpleOverlay_wiki
	//mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/CVNSimpleOverlay_wiki.js&action=raw&ctype=text/javascript');
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Amorymeltzer/userinfo.js&action=raw&ctype=text/javascript');
	if ([2, 3].indexOf(mw.config.get('wgNamespaceNumber')) !== -1 && (!mw.config.get('wgArticleId') || mw.config.get('wgAction') === 'view'))
	$.when(mw.loader.using('mediawiki.util'), $.ready).then(function () {
		mw.util.addPortletLink(
			'p-tb',
			'#',
			'ExtendedUserinfo',
			't-mworg2',
			'Load extended userinfo',
			'm',
			'#t-print').addEventListener('click', function () {
				mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Perhelion/userstatus.js&action=raw&ctype=text/javascript');
		});
	});
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Sam_Sailor/utnawh.js&action=raw&ctype=text/javascript');
// END USER SPACE AND USER TALK SPACE
// CATEGORIES
} else if (mw.config.get('wgNamespaceNumber') === 14) {
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:DannyS712/Subcategories.js&action=raw&ctype=text/javascript');
// END CATEGORIES
// FILES
} else if (mw.config.get('wgNamespaceNumber') === 6) {
	// 
// END FILES
// TEMPLATES
} else if ((mw.config.get('wgNamespaceNumber') === 10) || (mw.config.get('wgNamespaceNumber') === 11)) {
	// 
// END TEMPLATES
} // END else if loop but remain in non-articles
// WP + TALK SPACES
if ((mw.config.get('wgNamespaceNumber') === 4) || (mw.config.get('wgNamespaceNumber')%2 === 1)) {
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Pythoncoder/voteSymbols.js&action=raw&ctype=text/javascript');
	} // END WP + TALK SPACES
} // END ANYWHERE BUT ARTICLES
} // END ENTIRE NOT SPECIAL LOOP
// MIXED
// CONTRIBS, HISTORY, RECENT CHANGES, WATCHLIST
if (mw.config.get('wgAction') === 'history' || mw.config.get('wgCanonicalSpecialPageName') === 'Contributions' || mw.config.get('wgCanonicalSpecialPageName') === 'Watchlist' || mw.config.get('wgCanonicalSpecialPageName') === 'Recentchanges') {
	// 
} // END CONTRIBS, HISTORY, RECENT CHANGES, WATCHLIST
// CONTRIBS, HISTORY
if (mw.config.get('wgAction') === 'history' || mw.config.get('wgCanonicalSpecialPageName') === 'Contributions') {
	// 
} // END CONTRIBS, HISTORY
// DIFF ONLY, add diffOnly links everywhere but diff pages
if (mw.config.get('wgCanonicalSpecialPageName') != 'Contributions') {
	/*
	DiffOnly = {
		history: true,
		recentchanges: true,
		watchlist: true,
		diff: false
	};
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Amorymeltzer/DiffOnly.js&action=raw&ctype=text/javascript');
	*/
} // END DIFF ONLY
// ID RELATED
if (mw.config.exists('wgRelevantUserName')) {
	mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cumbril/IPLabeller.js&action=raw&ctype=text/javascript');
} // END ID RELATED