MediaWiki:Gadget-UserLinkAvatar.js: Difference between revisions
(Created page with ""use strict"; // <pre> (() => { const magnifierOn = +mw.user.options.get("gadget-userLinkAvatarMagnifier", 0) === 1; const $window = $(window); const loadingImage = ""//og link: "https://img.moegirl.org.cn/common/d/d1/Windows_10_loading.gif"; $window.on("load.UserLinkAvatar", () => { const images = []; $(".mw-userlink:not(.user-avatar-added)").each((_, ele) => { const item = $(ele); const src = `${mw.config.get("wgS...") |
(Replaced content with "$('.mw-userlink').each(function(_, item) { item = $(item); item.prepend($('<img/>').addClass('userlink-avatar').attr('src', mw.config.get('wgScriptPath') + '/extensions/Avatar/avatar.php?user=' + item.text())); });") Tags: Replaced Reverted |
||
Line 1: | Line 1: | ||
$('.mw-userlink').each(function(_, item) { | |||
item = $(item); | |||
item.prepend($('<img/>').addClass('userlink-avatar').attr('src', mw.config.get('wgScriptPath') + '/extensions/Avatar/avatar.php?user=' + item.text())); | |||
}); | |||
} | |||