MediaWiki:Common.js: Difference between revisions
MediaWiki interface page
More actions
(username removed) No edit summary Tag: Blanking |
Load live Roblox profile pictures |
||
| Line 1: | Line 1: | ||
$(function () { | |||
var userId = mw.config.get('abRobloxUserId'); | |||
if (!userId) { | |||
return; | |||
} | |||
var $img = $('.profile-avatar-image'); | |||
if (!$img.length) { | |||
return; | |||
} | |||
var fallback = $img.attr('src'); | |||
$img.on('error', function () { | |||
$img.attr('src', fallback); | |||
}); | |||
$img.attr( | |||
'src', | |||
'https://adventure-builder.net/api/roblox-proxy?service=profile-picture&userId=' + | |||
encodeURIComponent(userId) | |||
); | |||
}); | |||
Revision as of 17:51, 27 August 2026
$(function () {
var userId = mw.config.get('abRobloxUserId');
if (!userId) {
return;
}
var $img = $('.profile-avatar-image');
if (!$img.length) {
return;
}
var fallback = $img.attr('src');
$img.on('error', function () {
$img.attr('src', fallback);
});
$img.attr(
'src',
'https://adventure-builder.net/api/roblox-proxy?service=profile-picture&userId=' +
encodeURIComponent(userId)
);
});