User:RealDonaldTrump/common.js
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
mw.loader.load("//en.uncyclopedia.co/w/index.php?title=User:Zombiebaron/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('https://en.uncyclopedia.co/w/index.php?title=User:L10nM4st3r/convenientDiscussionsConfig.js&action=raw&ctype=text/javascript'); */
/* Edit counter in top bar - by Wikipedia:User:Mvolz */
$(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
(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 }
];
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);