User:Mondo/common.js

Source: Wikipedia, the free encyclopedia.
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.
importScript('User:Eizen/SkinSwitcher.js'); // Backlink: [[User:Eizen/SkinSwitcher.js]]
importScript('User:ClaudineChionh/Scripts/SkinSwitcher.js'); // Backlink: [[User:ClaudineChionh/Scripts/SkinSwitcher.js]]
importScript('User:Cacycle/wikEd.js'); // Backlink: [[User:Cacycle/wikEd.js]]
importScript('User:MarkS/extraeditbuttons.js'); // Backlink: [[User:MarkS/extraeditbuttons.js]]
mw.loader.load( '/w/index.php?title=User:Chlod/Scripts/FoldArchives.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Chlod/Scripts/FoldArchives.js]]
importScript( 'User:Enterprisey/fancy-diffs.js' ); // Backlink: [[User:Enterprisey/fancy-diffs.js]]
// [[User:Lenore/autolink]]
importScript('User:Lenore/autolink.js');
mw.loader.getScript("/w/index.php?title=User:Guywan/Scripts/HistoryHighlight.js&action=raw&ctype=text/javascript"); // Backlink: [[User:Guywan/Scripts/HistoryHighlight.js]]
importScript( 'User:Amorymeltzer/crathighlighter.js' ); // Backlink: [[User:Amorymeltzer/crathighlighter.js]]
mw.loader.load('/w/index.php?title=User:BrandonXLF/MobileView.js&action=raw&ctype=text/javascript'); // [[User:BrandonXLF/MobileView.js]]
importScript( 'User:RealFakeKim/Scripts/commonLinks.js' ); // Backlink: [[User:RealFakeKim/Scripts/commonLinks.js]]
importScript("User:Anpang01/Chocolate.js");
importScript( 'User:Equazcion/BetterTwinklePrefs.js' ); // Backlink: [[User:Equazcion/BetterTwinklePrefs.js]]
importScript("User:Awesome Aasim/noeditredlinks.js");
importScript( 'User:Taavi/Unslashifier.js' ); // Backlink: [[User:Taavi/Unslashifier.js]]
importScript("User:Awesome Aasim/CatMan.js"); //Linkback: [[User:Awesome Aasim/CatMan.js]]
importScript('User:Lourdes/Backlinks.js'); // Linkback: [[User:Lourdes/Backlinks.js]]



popupOnEditSelection=true;
popupImageLinks=true;
popupShowGender=true;
popupPreviewHistory=true;
popupFixRedirs=true;
popupTocLinks=true;
popupStructure='lite'
popupHideDelay=0;
importScript("User:PleaseStand/userinfo.js");

/* Show my contributions */

$(document).ready( function () { 
	mw.loader.using( 'mediawiki.user', function() {
	    ( new mw.Api() ).get( {
	        action: 'query',
	        meta: 'userinfo',
	        uiprop: 'editcount'
	    } ).done( function( result ) {
	    	var contribs = document.getElementById( 'pt-mycontris' )
	    	if ( contribs) contribs.append( ' (' + result.query.userinfo.editcount + ')' );
	    } );
	} );
} );

if(window.location.host.search("m.wikipedia.org") > 0 || window.location.pathname.search("Special:MobileDiff") > 0)
{
	var urlString = window.location.toString();
	if(urlString.search(/unmobile=true/) < 0)
	{
		urlString = urlString.replace(".m.wikipedia.org", ".wikipedia.org");
		urlString = urlString.replace("Special:MobileDiff", "Special:Diff");
		if(urlString.search(/\?/) > 0)
		{
			urlString += "&unmobile=true";
		}
		else 
		{
			urlString += "?unmobile=true";
		}	
		window.location.replace(urlString);
	}
}
mw.hook("wikipage.content").add( function()
	{
		$("div.mw-parser-output a").each(function(ind, el)
		{
			el.href = el.href.replace("Special:MobileDiff", "Special:Diff");
			if( $(el).hasClass("external"))
			{
				el.href = el.href.replace("m.wikipedia.org", "wikipedia.org");
			}
		});
	});