MediaWiki:Common.js: Difference between revisions
From BetaHaven Wiki
Jump to navigationJump to search
No edit summary |
No edit summary Tag: Reverted |
||
| Line 3: | Line 3: | ||
var username = $(this).text(); | var username = $(this).text(); | ||
var img = $('<img>') | var img = $('<img>') | ||
.attr('src', 'https://minotar.net/ | .attr('src', 'https://minotar.net/avatar/' + encodeURIComponent(username) + '/16') | ||
.css({ width: '16px', height: '16px', verticalAlign: 'middle', marginRight: '4px', imageRendering: 'pixelated' }); | .css({ width: '16px', height: '16px', verticalAlign: 'middle', marginRight: '4px', imageRendering: 'pixelated' }); | ||
$(this).prepend(img); | $(this).prepend(img); | ||
}); | }); | ||
}); | }); | ||
Revision as of 03:29, 3 June 2026
mw.hook('wikipage.content').add(function() {
$('.mw-userlink').each(function() {
var username = $(this).text();
var img = $('<img>')
.attr('src', 'https://minotar.net/avatar/' + encodeURIComponent(username) + '/16')
.css({ width: '16px', height: '16px', verticalAlign: 'middle', marginRight: '4px', imageRendering: 'pixelated' });
$(this).prepend(img);
});
});