Jump to content

User:Seraphim System/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Seraphim System (talk | contribs) at 15:46, 4 July 2018 (edit). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//Side bar
mw.loader.using( 'mediawiki.util' ).done( function() {
	mw.util.addPortletLink('p-navigation',  mw.util.getUrl('User:Seraphim_System/common.js'), "CommonJS");
	mw.util.addPortletLink('p-navigation',  mw.util.getUrl('Wikipedia:List_of_infoboxes'), "Infoboxes");
	mw.util.addPortletLink('p-navigation',  mw.util.getUrl('Special:RecentChangesLinked'), "Recent Changes");
	mw.util.addPortletLink('p-navigation', 'http://wikipedia.ramselehof.de/wikiblame', 'Countervandalism');
	mw.util.addPortletLink('p-navigation', 'http://edwardbetts.com/find_link', 'LinkFinder');
	mw.util.addPortletLink('p-navigation',	mw.util.getUrl('Special:NewPagesFeed'), "New Pages Feed");
	mw.util.addPortletLink('p-navigation', 'https://tools.wmflabs.org/nppbrowser', 'NPPbrowser');
} );

/* Syntax highligting */
//syntaxHighlighterConfig = {
//    externalLinkColor:"#FFFFFF", //sea
//    wikilinkColor:  "#98C8B2", //easter frosting
//    signatureColor: "#7b7b7b", //medium blue
//    tableColor: "#7b7b7b", //mint
//    templateColor: "#7b7b7b", //gray
//    parameterColor: "#7b7b7b", //magenta
//    tagColor: "#FFFFFF", //turkish rose
//    commentColor: "#7b7b7b", //turkish rose
//    entityColor: "#7b7b7b", //salmon

//page details copied from [[User:Anne drew Andrew and Drew/PageDetails.js]]
var pagename = encodeURIComponent(mw.config.get('wgPageName').replace(/_/g, " "));

mw.util.addPortletLink(
		'p-tb',
		mw.config.get("wgServer") + '/w/index.php?title=Special:WhatLinksHere/'+ pagename + '&hidelinks=1&hidetrans=1&limit=500',
		'What redirects here',
		't-redirects-here-tool',
		""
	);
	
if(mw.config.get('wgNamespaceNumber') === 0){ //mainspace
	mw.util.addPortletLink(
			'p-tb',
	        mw.config.get("wgServer") + "/w/index.php?title=Special%3AAllPages&from=Articles+for+deletion%2F" + pagename + "&to=Articles+for+deletion%2F" + pagename + "+%28z&namespace=4",
	        'AfD discussions',
			't-afd-discussions-tool',
			""
		);
	mw.util.addPortletLink(
			'p-tb',
	        mw.config.get("wgServer") + "/w/index.php?title=Special%3AAllPages&from=" + pagename + "%2FGA1&to=" + pagename + "%2FGAz&namespace=1",
	        'GA nominations',
			't-GA-nominations-tool',
			""
		);
	mw.util.addPortletLink(
			'p-tb',
	        mw.config.get("wgServer") + "/w/index.php?title=Special%3AAllPages&from=Good article reassessment%2F" + pagename + "%2F1&to=Good article reassessment%2F" + pagename + "%2Fz&namespace=4",
	        'GA reassesments',
			't-GA-reassesments-tool',
			""
		);
	mw.util.addPortletLink(
			'p-tb',
	        mw.config.get("wgServer") + "/w/index.php?title=Special%3AAllPages&from=Featured article candidates%2F" + pagename + "&to=Featured article candidates%2F" + pagename + "%2Farchivez&namespace=4",
	        'FA nominations',
			't-FA-nominations-tool',
			""
		);
	mw.util.addPortletLink(
			'p-tb',
	        mw.config.get("wgServer") + "/w/index.php?title=Special%3AAllPages&from=Featured article review%2F" + pagename + "&to=Featured article review%2F" + pagename + "%2Farchivez&namespace=4",
	        'FA reviews',
			't-FA-reviews-tool',
			""
		);
	mw.util.addPortletLink(
			'p-tb',
	        mw.config.get("wgServer") + "/w/index.php?title=Special%3AAllPages&from=Peer review%2F" + pagename + "&to=Peer review%2F" + pagename + "%2Farchivez&namespace=4",
	        'Peer reviews',
			't-Peer-reviews-tool',
			""
		);
}


//toolbar
$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).done( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.getUrl('Wikipedia:List of current and old AfDs'),
    'AfDs',
    'pt-specialnew',
    'View the AfD listings of the past 7 days and more...',
    null,
    '#pt-preferences'
    );
  mw.util.addPortletLink(
    'p-personal',
    mw.util.getUrl('Special:PrefixIndex/User:Seraphim_System'),
    'Subpages',
    'pt-specialnew',
    'Userspace',
    null,
    '#pt-preferences'
    );
});

importScript('User:Primefac/revdel.js'); // [[User:Primefac/revdel]]
importScript('User:V111P/js/smartLinkingLoader.js'); // [[User:V111P/js/smartLinkingLoader.js]]
importScript('User:Meteor sandwich yum/Tidy citations.js'); //[[User:Meteor sandwich yum/Tidy citations.js]]
importScript('User:Evad37/rater.js'); // [[User:Evad37/rater]]
//importScript('Wikipedia:AutoEd/wikichecker.js');
importScript('User:Ohconfucius/script/EngvarB.js'); // [[User:Ohconfucius/script/EngvarB.js]]
//importScript('User:Ohconfucius/script/formatgeneral.js'); // [[User:Ohconfucius/script/formatgeneral.js]]
//importScript('User:Ohconfucius/script/Sources.js'); // [[User:Ohconfucius/script/Sources.js]]
importScript('User:GregU/dashes.js');
importScript('User:Ohconfucius/script/MOSNUM dates.js'); // [[User:Ohconfucius/script/MOSNUM dates.js]]
importScript('User:Evad37/XFDcloser.js'); // [[User:Evad37/XFDcloser]]
//importScript("User:PleaseStand/userinfo.js"); // [[User:PleaseStand/User info]]
importScript('User:Enterprisey/delsort.js' ); // Backlink: [[User:Enterprisey/delsort.js]]
importScript('User:Lourdes/PageCuration.js'); // Linkback: [[User:Lourdes/PageCuration.js]]
importScript('User:Ais523/stubtagtab2.js'); // Linkback: [[User:Ais523/stubtagtab2.js]
importScript( 'User:Technical_13/Scripts/OneClickArchiver.js' ); // Backlink: [[User:Technical_13/Scripts/OneClickArchiver]]
importScript('User:Ucucha/HarvErrors.js');
importScript('User:Lingzhi/reviewsourcecheck.js');
importScript( 'User:Evad37/MoveToDraft.js' ); // Backlink: [[User:Evad37/MoveToDraft]]
importScript('User:Gary/nominations viewer.js'); // [[Wikipedia:Nominations Viewer]]