Difference between revisions of "MediaWiki:Common.js"

From Aurora Information Uplink
Jump to navigation Jump to search
(Some JS by request of Burrito. Hopefully nothing implodes. (This is for adding custom classes to images automatically.))
 
(Test fixes.)
 
Line 6: Line 6:
         }
         }
     });
     });
});
});

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