User:DR/common.js: Difference between revisions
< User:DR
Content deleted Content added
test |
restore Tag: Manual revert |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
importScript('User:DR/UserInfoEN.js'); // Backlink: [[User:DR/UserInfoEN.js]] |
|||
function displayUserInfo(user, language = 'en') { |
|||
const translations = userInfoTranslations[language]; |
|||
const userInfo = { |
|||
autopatrol: translations.autopatrol || 'autopatrol', |
|||
translateadmin: translations.translateadmin || 'translateadmin', |
|||
autoconfirmed: translations.autoconfirmed || 'autoconfirmed', |
|||
registered: `${user.registrationDate} - ${translations.registered}`, |
|||
edits: `${user.editCount} ${translations.edits}`, |
|||
contributions: `<a href="https://fr.vikidia.org/wiki/Spécial:Contributions/${user.name}">${translations.contributions}</a>`, |
|||
userPage: `<a href="https://fr.vikidia.org/wiki/${user.name}">${translations.userPage}</a>`, |
|||
talkPage: `<a href="https://fr.vikidia.org/wiki/Discussion_utilisateur:${user.name}">${translations.talkPage}</a>`, |
|||
}; |
|||
console.log(userInfo); |
|||
} |