MediaWiki:Common.js: Difference between revisions

From Aurora Information Uplink
Jump to navigation Jump to search
Skull132 (talk | contribs)
Some JS by request of Burrito. Hopefully nothing implodes. (This is for adding custom classes to images automatically.)
(No difference)

Revision as of 20:12, 6 May 2018

/* Any JavaScript here will be loaded for all users on every page load. */
$(document).ready(function() {
    $('img').each(function(e) {
        if (($(this).height() <= 64) && ($(this).width() <= 64)) {
            $(this).addClass('tinyimage');
        }
    });
});