Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
//catALot///////////////////////////////////////
////////// Cat-A-Lot user preferences //////////
window.catALotPrefs = {"watchlist":"preferences","minor":true,"editpages":false,"docleanup":true,"subcatcount":17};
////////////////////////////////////catALotEnd//
window.HotCatAutoRemoveCheckCat = true;

importScript( 'User:Bawolff/search.js' );

mw.loader.load( "https://de.wikipedia.org/w/index.php?title=MediaWiki:Gadget-DeepCat.js&action=raw&ctype=text/javascript" );

// [[File:Krinkle_RTRC.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');

/////// tab with ImgOps full resolution by User:Christian Ferrer///////
/*global mw, $*/
/*jshint curly:false */

$(document).ready(function() {
	if (mw.config.get('wgNamespaceNumber') !== 6 || mw.config.get('wgAction') !== "view" || !document.getElementById('file')) return;
	var $link = $('.fullImageLink a[class!="mw-thumbnail-link"]'),
		$image = $link.find('img'),
		imageurl = $link.attr('href');

	if (imageurl === undefined || $image.length < 1) return; // No preview image, e.g. for large PNGs or video

	if (imageurl.substring(0, 2) == '//') 
		imageurl = 'https:' + imageurl;
	mw.util.addPortletLink('p-cactions', 'https://imgops.com/' + encodeURIComponent(imageurl), 'ImgOps full resolution', 'ca-imgops', null);
});
////////// tab with ImgOps 300px by User:Christian Ferrer//////////
/*global mw, $*/
/*jshint curly:false */

$(document).ready(function() {
	if (mw.config.get('wgNamespaceNumber') !== 6 || mw.config.get('wgAction') !== "view" || !document.getElementById('file')) return;
	var $link = $('.fullImageLink a[class!="mw-thumbnail-link"]'),
		$image = $link.find('img'),
		imageurl = $link.attr('href');

	if (imageurl === undefined || $image.length < 1) return; // No preview image, e.g. for large PNGs or video

	if ($image.width() <= 300) {
		imageurl = $image.attr('src'); //Image smaller than 300px width
	} else { //Get thumb url
		var n = imageurl.indexOf("/commons/");
		imageurl = imageurl.substring(0, n + ("/commons/").length) + "thumb/" + imageurl.substring(n + ("/commons/").length);

		n = imageurl.lastIndexOf('/') + 1;
		imageurl = imageurl + "/300px-" + imageurl.substring(n);
	}
	if (imageurl.substring(0, 2) == '//') 
		imageurl = 'https:' + imageurl;
	mw.util.addPortletLink('p-cactions', 'https://imgops.com/' + encodeURIComponent(imageurl), 'ImgOps 300px', 'ca-imgops', null);
});