MediaWiki:Common.js: Difference between revisions

OMNIVERSE
No edit summary
Blanked the page
Tag: Blanking
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
 
// Simpler: Make image links open the full resolution image
$('.mw-parser-output a.image').each(function() {
    var $img = $(this).find('img');
    if ($img.length) {
        var src = $img.attr('src');
        // Remove thumbnail path to get full image
        var fullSrc = src.replace(/\/thumb\//, '/').replace(/\/\d+px-[^/]+$/, '');
        $(this).attr('href', fullSrc);
    }
});

Latest revision as of 03:21, 25 January 2026