diff --git a/dist/MarkRights/MarkRights.js b/dist/MarkRights/MarkRights.js index 549d49eb..4c5d6666 100644 --- a/dist/MarkRights/MarkRights.js +++ b/dist/MarkRights/MarkRights.js @@ -278,9 +278,8 @@ var i18nMessages = getI18nMessages(); var getMessage = (key) => { return i18nMessages[key] || key; }; -//! src/MarkRights/modules/core.ts -var import_ext_gadget3 = require("ext.gadget.Util"); -var getUsername = (url) => { +//! src/MarkRights/modules/util/getUserName.ts +var getUserName = (url) => { if (!url) { return ""; } @@ -307,33 +306,30 @@ var getUsername = (url) => { } return ""; }; -var appendUserRightsMark = ($userLinks, { - userGroupMap, - globalUserGroupMap -}) => { +//! src/MarkRights/modules/util/appendUserRightsMark.ts +var import_ext_gadget3 = require("ext.gadget.Util"); +var appendUserRightsMark = ($userLinks, userGroups) => { var _iterator2 = _createForOfIteratorHelper($userLinks), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { - var _$element$attr, _userGroupMap$get, _globalUserGroupMap$g; - const element = _step2.value; - const $element = $(element); - if ($element.parents("li").find(".gadgets-markrights").length) { - continue; - } - if ($element.siblings(".gadgets-markrights").length) { - continue; - } - const username = getUsername((_$element$attr = $element.attr("href")) !== null && _$element$attr !== void 0 ? _$element$attr : ""); + var _$element$attr, _userGroups, _userGroups$username; + const $element = _step2.value; + const username = getUserName((_$element$attr = $element.attr("href")) !== null && _$element$attr !== void 0 ? _$element$attr : ""); if (!username) { continue; } - const groups = (_userGroupMap$get = userGroupMap.get(username)) !== null && _userGroupMap$get !== void 0 ? _userGroupMap$get : []; - const globalGroups = (_globalUserGroupMap$g = globalUserGroupMap.get(username)) !== null && _globalUserGroupMap$g !== void 0 ? _globalUserGroupMap$g : []; - if (!groups) { - continue; + (_userGroups = userGroups) !== null && _userGroups !== void 0 ? _userGroups : userGroups = {}; + const groups = (_userGroups$username = userGroups[username]) !== null && _userGroups$username !== void 0 ? _userGroups$username : []; + let $sups; + if ($element.parents("li").find(".gadgets-markrights").length) { + $sups = $element.siblings(".gadgets-markrights").eq(0); + } else if ($element.siblings(".gadgets-markrights").length) { + $sups = $element.parents("li").find(".gadgets-markrights").eq(0); + } else { + $sups = $("").addClass("gadgets-markrights"); + $element.after($sups); } - const $sups = $("").addClass("gadgets-markrights"); - var _iterator3 = _createForOfIteratorHelper((0, import_ext_gadget3.uniqueArray)([...groups, ...globalGroups])), _step3; + var _iterator3 = _createForOfIteratorHelper((0, import_ext_gadget3.uniqueArray)(groups)), _step3; try { for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { const group = _step3.value; @@ -343,25 +339,8 @@ var appendUserRightsMark = ($userLinks, { } $sups.append( // The following classes are used here: - // * gadget-markrights__qiuwen - // * gadget-markrights__steward - // * gadget-markrights__checkuser - // * gadget-markrights__suppress - // * gadget-markrights__sysop - // * gadget-markrights__interface-admin - // * gadget-markrights__templateeditor - // * gadget-markrights__transwiki - // * gadget-markrights__patroller - // * gadget-markrights__autoreviewer - // * gadget-markrights__senioreditor - // * gadget-markrights__eventsponsor - // * gadget-markrights__massmessage-sender - // * gadget-markrights__confirmed - // * gadget-markrights__autoconfirmed - // * gadget-markrights__bot - // * gadget-markrights__flood - // * gadget-markrights__ipblock-exempt - // * gadget-markrights__rnrsverify-exempt + // * see ../types.d.ts + // * for more information $("").addClass(className).attr({ alt: getMessage(group), title: getMessage(group) @@ -373,7 +352,6 @@ var appendUserRightsMark = ($userLinks, { } finally { _iterator3.f(); } - $element.after($sups); } } catch (err) { _iterator2.e(err); @@ -381,97 +359,127 @@ var appendUserRightsMark = ($userLinks, { _iterator2.f(); } }; -var markUserRights = /* @__PURE__ */ function() { - var _ref3 = _asyncToGenerator(function* ($content) { - const $userLinks = $content.find("a.mw-userlink:not(.mw-anonuserlink)"); - let users = []; - const queue = []; - const userGroupMap = /* @__PURE__ */ new Map(); - const globalUserGroupMap = /* @__PURE__ */ new Map(); - var _iterator4 = _createForOfIteratorHelper($userLinks), _step4; - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) { - const element = _step4.value; - const $element = $(element); - if ($element.parents("li").find(".gadgets-markrights").length) { - continue; - } - if ($element.siblings(".gadgets-markrights").length) { - continue; - } - const { - textContent - } = element; - const userLinkText = textContent === null || textContent === void 0 ? void 0 : textContent.toString(); - if (userLinkText) { - users[users.length] = userLinkText; - } - users = (0, import_ext_gadget3.uniqueArray)(users); - if (users.length === 25) { - queue[queue.length] = users; - users = []; - } +//! src/MarkRights/modules/util/generateUserLinks.ts +var generateUserLinks = ($content) => { + const users = []; + const $userLinks = []; + const $elements = $content.find("a.mw-userlink:not(.mw-anonuserlink)"); + var _iterator4 = _createForOfIteratorHelper($elements), _step4; + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) { + const element = _step4.value; + const $element = $(element); + if ($element.parents("li").find(".gadgets-markrights").length || $element.siblings(".gadgets-markrights").length) { + continue; } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); + $userLinks[$userLinks.length] = $element; + const { + textContent + } = element; + const user = textContent === null || textContent === void 0 ? void 0 : textContent.toString(); + if (!user) { + continue; + } + users[users.length] = user; } - if (users.length > 0) { - queue[queue.length] = users; + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + return { + users, + $userLinks + }; +}; +//! src/MarkRights/modules/core.ts +var markUserRights = ($content) => { + const { + users, + $userLinks + } = generateUserLinks($content); + const promises = []; + for (let i = 0; i < users.length; i++) { + const ususers = users.splice(0, 25); + if (!ususers.length) { + continue; } - for (var _i = 0, _queue = queue; _i < _queue.length; _i++) { - const ususers = _queue[_i]; + promises[promises.length] = /* @__PURE__ */ _asyncToGenerator(function* () { + const userGroups = {}; try { - const queryUserResponse = yield queryUserGroups(ususers); + const response = yield queryUserGroups(ususers); const { users: queryUsers - } = queryUserResponse["query"]; + } = response["query"]; var _iterator5 = _createForOfIteratorHelper(queryUsers), _step5; try { for (_iterator5.s(); !(_step5 = _iterator5.n()).done; ) { + var _userGroups$name; const user = _step5.value; - if (!user || !user.groups) { + if (!(user !== null && user !== void 0 && user.name) || !(user !== null && user !== void 0 && user.groups)) { continue; } - userGroupMap.set(user.name, user.groups.filter((element) => { + const { + name, + groups + } = user; + (_userGroups$name = userGroups[name]) !== null && _userGroups$name !== void 0 ? _userGroups$name : userGroups[name] = []; + userGroups[name] = [...userGroups[name], ...groups.filter((element) => { return element !== "*"; - })); + })]; } } catch (err) { _iterator5.e(err); } finally { _iterator5.f(); } - var _iterator6 = _createForOfIteratorHelper(ususers), _step6; - try { - for (_iterator6.s(); !(_step6 = _iterator6.n()).done; ) { - const user = _step6.value; - const queryGlobalUserInfoResponse = yield queryGlobalUserGroups(user); - if (queryGlobalUserInfoResponse["query"] && queryGlobalUserInfoResponse["query"].globaluserinfo) { - const { - groups: globalgroups - } = queryGlobalUserInfoResponse["query"].globaluserinfo; - globalUserGroupMap.set(user, globalgroups); + } catch (error) { + console.error("[MarkRights] Ajax error:", error); + } + appendUserRightsMark($userLinks, userGroups); + }); + promises[promises.length] = /* @__PURE__ */ _asyncToGenerator(function* () { + const userGroups = {}; + var _iterator6 = _createForOfIteratorHelper(ususers), _step6; + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done; ) { + const user = _step6.value; + try { + var _userGroups$user; + const response = yield queryGlobalUserGroups(user); + const { + globaluserinfo + } = response["query"]; + if (!(globaluserinfo !== null && globaluserinfo !== void 0 && globaluserinfo.groups)) { + continue; } + const { + groups + } = globaluserinfo; + (_userGroups$user = userGroups[user]) !== null && _userGroups$user !== void 0 ? _userGroups$user : userGroups[user] = []; + userGroups[user] = [...userGroups[user], ...groups]; + } catch (error) { + console.error("[MarkRights] Ajax error:", error); } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); } - appendUserRightsMark($userLinks, { - userGroupMap, - globalUserGroupMap - }); + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + appendUserRightsMark($userLinks, userGroups); + }); + } + void _asyncToGenerator(function* () { + for (var _i = 0, _promises = promises; _i < _promises.length; _i++) { + const promise = _promises[_i]; + try { + yield promise(); } catch { } } - }); - return function markUserRights2(_x3) { - return _ref3.apply(this, arguments); - }; -}(); + })(); +}; //! src/MarkRights/MarkRights.ts mw.hook("wikipage.content").add(function markRights($content) { if ($content.attr("id") === "mw-content-text" || $content.hasClass("mw-changeslist")) { @@ -483,4 +491,4 @@ mw.hook("wikipage.content").add(function markRights($content) { /* */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL01hcmtSaWdodHMvTWFya1JpZ2h0cy50cyIsICJzcmMvTWFya1JpZ2h0cy9vcHRpb25zLmpzb24iLCAic3JjL01hcmtSaWdodHMvbW9kdWxlcy9hcGkudHMiLCAic3JjL01hcmtSaWdodHMvbW9kdWxlcy9xdWVyeS50cyIsICJzcmMvTWFya1JpZ2h0cy9tb2R1bGVzL2kxOG4udHMiLCAic3JjL01hcmtSaWdodHMvbW9kdWxlcy9jb3JlLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIEBkZXNjcmlwdGlvbiDlnKjmnIDov5Hkv67mlLnjgIHnm5Hop4bliJfooajjgIHmnaHnm67ljoblj7LorrDlvZXnrYnkvY3nva7ku6XnibnmrormoLzlvI/mmL7npLrmnInnibnmrormnYPpmZDnmoTnlKjmiLdcbiAqL1xuaW1wb3J0IHttYXJrVXNlclJpZ2h0c30gZnJvbSAnLi9tb2R1bGVzL2NvcmUnO1xuXG5tdy5ob29rKCd3aWtpcGFnZS5jb250ZW50JykuYWRkKGZ1bmN0aW9uIG1hcmtSaWdodHMoJGNvbnRlbnQpOiB2b2lkIHtcblx0aWYgKCRjb250ZW50LmF0dHIoJ2lkJykgPT09ICdtdy1jb250ZW50LXRleHQnIHx8ICRjb250ZW50Lmhhc0NsYXNzKCdtdy1jaGFuZ2VzbGlzdCcpKSB7XG5cdFx0dm9pZCBtYXJrVXNlclJpZ2h0cygkY29udGVudCk7XG5cdH1cbn0pO1xuXG5leHBvcn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idXNlckdyb3VwcyIsICJfaXRlcmF0b3IyIiwgIl9jcmVhdGVGb3JPZkl0ZXJhdG9ySGVscGVyIiwgIl9zdGVwMiIsICJzIiwgIm4iLCAiZG9uZSIsICJfJGVsZW1lbnQkYXR0ciIsICJfdXNlckdyb3VwcyIsICJfdXNlckdyb3VwcyR1c2VybmFtZSIsICIkZWxlbWVudCIsICJ2YWx1ZSIsICJhdHRyIiwgImdyb3VwcyIsICIkc3VwcyIsICJwYXJlbnRzIiwgImZpbmQiLCAibGVuZ3RoIiwgInNpYmxpbmdzIiwgImVxIiwgIiQiLCAiYWRkQ2xhc3MiLCAiYWZ0ZXIiLCAiX2l0ZXJhdG9yMyIsICJ1bmlxdWVBcnJheSIsICJfc3RlcDMiLCAiZ3JvdXAiLCAiY2xhc3NOYW1lIiwgImhhc0NsYXNzIiwgImFwcGVuZCIsICJhbHQiLCAidGl0bGUiLCAiZXJyIiwgImUiLCAiZiIsICJnZW5lcmF0ZVVzZXJMaW5rcyIsICIkY29udGVudCIsICJ1c2VycyIsICIkZWxlbWVudHMiLCAiX2l0ZXJhdG9yNCIsICJfc3RlcDQiLCAiZWxlbWVudCIsICJ0ZXh0Q29udGVudCIsICJ0b1N0cmluZyIsICJtYXJrVXNlclJpZ2h0cyIsICJwcm9taXNlcyIsICJpIiwgInNwbGljZSIsICJxdWVyeVVzZXJzIiwgIl9pdGVyYXRvcjUiLCAiX3N0ZXA1IiwgIl91c2VyR3JvdXBzJG5hbWUiLCAibmFtZSIsICJmaWx0ZXIiLCAiZXJyb3IiLCAiY29uc29sZSIsICJfaXRlcmF0b3I2IiwgIl9zdGVwNiIsICJfdXNlckdyb3VwcyR1c2VyIiwgImdsb2JhbHVzZXJpbmZvIiwgIl9pIiwgIl9wcm9taXNlcyIsICJwcm9taXNlIiwgImhvb2siLCAiYWRkIiwgIm1hcmtSaWdodHMiXQp9Cg== diff --git a/src/MarkRights/modules/core.ts b/src/MarkRights/modules/core.ts index 06de7928..3249b818 100644 --- a/src/MarkRights/modules/core.ts +++ b/src/MarkRights/modules/core.ts @@ -1,166 +1,85 @@ import {queryGlobalUserGroups, queryUserGroups} from './query'; -import type {UserRights} from './types'; -import {getMessage} from './i18n'; -import {uniqueArray} from 'ext.gadget.Util'; +import {appendUserRightsMark} from './util/appendUserRightsMark'; +import {generateUserLinks} from './util/generateUserLinks'; -const getUsername = (url: string): string => { - if (!url) { - return ''; - } +const markUserRights = ($content: JQuery): void => { + const {users, $userLinks} = generateUserLinks($content); - const username: string | null = mw.util.getParamValue('title', url); + const promises: (() => Promise)[] = []; - const decode = (string: string, replace: (_string: string) => string): string => { - return decodeURIComponent( - ((): string => { - try { - return decodeURIComponent(replace(string)); - } catch { - return replace(string).replace(/%(?!\d+)/g, '%25'); - } - })() - ); - }; - - if (username) { - return decode(username, (string: string): string => { - return string.replace('User:', '').replace(/_/g, ' '); - }); - } - const usernameMatch: RegExpMatchArray | null = url.match(/\/wiki\/User:(.+?)$/); - if (usernameMatch?.[1]) { - return decode(usernameMatch[1], (string: string): string => { - return string.replace(/_/g, ' '); - }); - } - return ''; -}; - -const appendUserRightsMark = ( - $userLinks: JQuery, - {userGroupMap, globalUserGroupMap}: {userGroupMap: Map; globalUserGroupMap: Map} -): void => { - for (const element of $userLinks) { - const $element: JQuery = $(element); - if ($element.parents('li').find('.gadgets-markrights').length) { - continue; - } - if ($element.siblings('.gadgets-markrights').length) { + for (let i = 0; i < users.length; i++) { + const ususers = users.splice(0, 25); + if (!ususers.length) { continue; } - const username: string = getUsername($element.attr('href') ?? ''); - if (!username) { - continue; - } - const groups = userGroupMap.get(username) ?? []; - const globalGroups = globalUserGroupMap.get(username) ?? []; - if (!groups) { - continue; - } - const $sups: JQuery = $('').addClass('gadgets-markrights'); - for (const group of uniqueArray([...groups, ...globalGroups])) { - const className: string = `gadgets-markrights__${group}`; - if ($sups.find('sup').hasClass(className)) { - continue; - } - $sups.append( - // The following classes are used here: - // * gadget-markrights__qiuwen - // * gadget-markrights__steward - // * gadget-markrights__checkuser - // * gadget-markrights__suppress - // * gadget-markrights__sysop - // * gadget-markrights__interface-admin - // * gadget-markrights__templateeditor - // * gadget-markrights__transwiki - // * gadget-markrights__patroller - // * gadget-markrights__autoreviewer - // * gadget-markrights__senioreditor - // * gadget-markrights__eventsponsor - // * gadget-markrights__massmessage-sender - // * gadget-markrights__confirmed - // * gadget-markrights__autoconfirmed - // * gadget-markrights__bot - // * gadget-markrights__flood - // * gadget-markrights__ipblock-exempt - // * gadget-markrights__rnrsverify-exempt - $('') - .addClass(className) - .attr({ - alt: getMessage(group as UserRights), - title: getMessage(group as UserRights), - }) - ); - } - $element.after($sups); - } -}; -const markUserRights = async ($content: JQuery): Promise => { - const $userLinks: JQuery = $content.find('a.mw-userlink:not(.mw-anonuserlink)'); - let users: string[] = []; - const queue: Array = []; - const userGroupMap: Map = new Map(); - const globalUserGroupMap: Map = new Map(); + promises[promises.length] = async (): Promise => { + const userGroups: Record = {}; - for (const element of $userLinks) { - const $element: JQuery = $(element); - if ($element.parents('li').find('.gadgets-markrights').length) { - continue; - } - if ($element.siblings('.gadgets-markrights').length) { - continue; - } - const {textContent} = element; - const userLinkText: string | undefined = textContent?.toString(); - if (userLinkText) { - users[users.length] = userLinkText; // Replace `[].push()` to avoid polyfilling core-js - } + try { + const response = await queryUserGroups(ususers); + const {users: queryUsers} = response['query'] as { + users: {groups: string[]; name: string}[]; + }; - // 用户名列表去重 - users = uniqueArray(users); // Replace `[...new Set()]` to avoid polyfilling core-js + for (const user of queryUsers) { + if (!user?.name || !user?.groups) { + continue; + } - if (users.length === 25) { - queue[queue.length] = users; // Replace `[].push()` to avoid polyfilling core-js - users = []; - } - } - - if (users.length > 0) { - queue[queue.length] = users; // Replace `[].push()` to avoid polyfilling core-js - } + const {name, groups} = user; - for (const ususers of queue) { - try { - const queryUserResponse = await queryUserGroups(ususers); - const {users: queryUsers} = queryUserResponse['query'] as { - users: {groups: string[]; name: string}[]; - }; + userGroups[name] ??= []; - for (const user of queryUsers) { - if (!user || !user.groups) { - continue; + userGroups[name] = [ + ...userGroups[name], + ...groups.filter((element) => { + return element !== '*'; + }), + ]; } - userGroupMap.set( - user.name, - user.groups.filter((element) => { - return element !== '*'; - }) - ); + } catch (error: unknown) { + console.error('[MarkRights] Ajax error:', error); } + appendUserRightsMark($userLinks, userGroups); + }; + + promises[promises.length] = async (): Promise => { + const userGroups: Record = {}; + for (const user of ususers) { - const queryGlobalUserInfoResponse = await queryGlobalUserGroups(user); - if (queryGlobalUserInfoResponse['query'] && queryGlobalUserInfoResponse['query'].globaluserinfo) { - const {groups: globalgroups}: {groups: string[]} = queryGlobalUserInfoResponse['query'] - .globaluserinfo as {groups: string[]}; - globalUserGroupMap.set(user, globalgroups); + try { + const response = await queryGlobalUserGroups(user); + const {globaluserinfo} = response['query'] as { + globaluserinfo: {groups: string[]}; + }; + + if (!globaluserinfo?.groups) { + continue; + } + + const {groups} = globaluserinfo; + + userGroups[user] ??= []; + + userGroups[user] = [...userGroups[user], ...groups]; + } catch (error: unknown) { + console.error('[MarkRights] Ajax error:', error); } } - appendUserRightsMark($userLinks, {userGroupMap, globalUserGroupMap}); - } catch {} + appendUserRightsMark($userLinks, userGroups); + }; } + + void (async () => { + for (const promise of promises) { + try { + await promise(); + } catch {} + } + })(); }; export {markUserRights}; diff --git a/src/MarkRights/modules/util/appendUserRightsMark.ts b/src/MarkRights/modules/util/appendUserRightsMark.ts new file mode 100644 index 00000000..ccc9e858 --- /dev/null +++ b/src/MarkRights/modules/util/appendUserRightsMark.ts @@ -0,0 +1,47 @@ +import type {UserRights} from '../types'; +import {getMessage} from '../i18n'; +import {getUserName} from './getUserName'; +import {uniqueArray} from 'ext.gadget.Util'; + +const appendUserRightsMark = ($userLinks: JQuery[], userGroups: Record): void => { + for (const $element of $userLinks) { + const username: string = getUserName($element.attr('href') ?? ''); + if (!username) { + continue; + } + + userGroups ??= {}; + const groups = userGroups[username] ?? []; + + let $sups: JQuery; + if ($element.parents('li').find('.gadgets-markrights').length) { + $sups = $element.siblings('.gadgets-markrights').eq(0); + } else if ($element.siblings('.gadgets-markrights').length) { + $sups = $element.parents('li').find('.gadgets-markrights').eq(0); + } else { + $sups = $('').addClass('gadgets-markrights'); + $element.after($sups); + } + + for (const group of uniqueArray(groups)) { + const className: string = `gadgets-markrights__${group}`; + if ($sups.find('sup').hasClass(className)) { + continue; + } + + $sups.append( + // The following classes are used here: + // * see ../types.d.ts + // * for more information + $('') + .addClass(className) + .attr({ + alt: getMessage(group as UserRights), + title: getMessage(group as UserRights), + }) + ); + } + } +}; + +export {appendUserRightsMark}; diff --git a/src/MarkRights/modules/util/generateUserLinks.ts b/src/MarkRights/modules/util/generateUserLinks.ts new file mode 100644 index 00000000..f79511cb --- /dev/null +++ b/src/MarkRights/modules/util/generateUserLinks.ts @@ -0,0 +1,30 @@ +const generateUserLinks = ($content: JQuery): {users: string[]; $userLinks: JQuery[]} => { + const users: string[] = []; + const $userLinks: JQuery[] = []; + const $elements = $content.find('a.mw-userlink:not(.mw-anonuserlink)'); + + for (const element of $elements) { + const $element: JQuery = $(element); + if ( + $element.parents('li').find('.gadgets-markrights').length || + $element.siblings('.gadgets-markrights').length + ) { + continue; + } + + $userLinks[$userLinks.length] = $element; + + const {textContent} = element; + const user: string | undefined = textContent?.toString(); + + if (!user) { + continue; + } + + users[users.length] = user; + } + + return {users, $userLinks}; +}; + +export {generateUserLinks}; diff --git a/src/MarkRights/modules/util/getUserName.ts b/src/MarkRights/modules/util/getUserName.ts new file mode 100644 index 00000000..f6f3159c --- /dev/null +++ b/src/MarkRights/modules/util/getUserName.ts @@ -0,0 +1,37 @@ +const getUserName = (url: string): string => { + if (!url) { + return ''; + } + + const username: string | null = mw.util.getParamValue('title', url); + + const decode = (string: string, replace: (_string: string) => string): string => { + return decodeURIComponent( + ((): string => { + try { + return decodeURIComponent(replace(string)); + } catch { + return replace(string).replace(/%(?!\d+)/g, '%25'); + } + })() + ); + }; + + if (username) { + return decode(username, (string: string): string => { + return string.replace('User:', '').replace(/_/g, ' '); + }); + } + + const usernameMatch: RegExpMatchArray | null = url.match(/\/wiki\/User:(.+?)$/); + + if (usernameMatch?.[1]) { + return decode(usernameMatch[1], (string: string): string => { + return string.replace(/_/g, ' '); + }); + } + + return ''; +}; + +export {getUserName};