User:Gergdown/common.js

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

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

  • Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
  • Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
  • Opera, Konqueror and Safari users can just click the Reload button.
  • Chrome: press Ctrl+F5 or Shift+F5
/* WTOOLS */
/* mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:L10nM4st3r/wToolCore.js&action=raw&ctype=text/javascript');

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

/* Sig image shrinkinizer 3000 */
(function($, mw) {
    
$(function() {
        
var imagesToResize = [
            
{ alt: "OPOSSUMSIG.gif", height: 20 },
            
{ alt: "Fish on skates.gif", height: 20 },
            
{ alt: "Dinosaur5.gif", height: 20 },
            
{ alt: "Sun-asplode.gif", height: 20 },
            
{ alt: "Alula.gif", height: 20 },
            
{ alt: "LucyDance2.gif", height: 20 }
        
];
        
imagesToResize.forEach(function(imgData) {
            
$('img[alt="' + imgData.alt + '"]').each(function() {
                
var img = $(this);
                
var originalWidth = img.width();
                
var originalHeight = img.height();
                
if (originalHeight === 0) return;
                
var newWidth = Math.round(originalWidth * (imgData.height / originalHeight));
                
img.attr('height', imgData.height);
                
img.attr('width', newWidth);
            
});
        
});
    
});
})(jQuery, mw);

/* External scripts */
mw.loader.load("//en.uncyclopedia.co/w/index.php?title=User:RealDonaldTrump/SkinSwitcher.js&action=raw&ctype=text/javascript"); //Skin switcher (Based on the original script by Wikipedia:User:Eizzen)
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript'); //Javascript Wiki Browser
mw.loader.load( '//de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&oldid=260445546&action=raw&ctype=text/javascript' );
// mw.loader.load("//en.uncyclopedia.co/w/index.php?title=User:RealDonaldTrump/UserCSSToggle.js&action=raw&ctype=text/javascript"); // User CSS toggle
// mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:L10nM4st3r/wToolCore.js&action=raw&ctype=text/javascript');