MediaWiki:Gadget-ShowAvatar.js: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
var link = $('<a>').attr('href', mw.util.getUrl('Special:UploadAvatar')).append(img); | var link = $('<a>').attr('href', mw.util.getUrl('Special:UploadAvatar')).append(img); | ||
$('#pt-userpage').before($('<li id="pt-avatar"></li>').append(link)); | $('#pt-userpage').before($('<li id="pt-avatar"></li>').append(link)); | ||
$('.mw-ui-icon-wikimedia-userAvatar').style("background-image:'mw.config.get('wgScriptPath') + '/extensions/Avatar/avatar.php?user=' + mw.user.id()'") |
Revision as of 09:48, 22 December 2022
var img = $('<img>').attr('src', mw.config.get('wgScriptPath') + '/extensions/Avatar/avatar.php?user=' + mw.user.id());
var link = $('<a>').attr('href', mw.util.getUrl('Special:UploadAvatar')).append(img);
$('#pt-userpage').before($('<li id="pt-avatar"></li>').append(link));
$('.mw-ui-icon-wikimedia-userAvatar').style("background-image:'mw.config.get('wgScriptPath') + '/extensions/Avatar/avatar.php?user=' + mw.user.id()'")