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.)
 
Skull132 (talk | contribs)
Test fixes.
 
Line 6: Line 6:
         }
         }
     });
     });
});
});

Latest revision as of 19:38, 7 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');
        }
    });
});