INNER CODE UNIT · JavaScript

getUsername

AscensionGameDev/Intersect-Engine · scripts/AUTHORS.md.updater.devtools.js:43

    function getUsername(url) {
        return url.replace('https://github.com/', '').toLowerCase();
    }

    function userToLine({ name, link }) {
        return `[${name}](${link})`;
    }

    const contributorLinks = [...document.querySelector('[app-name=repos-contributors-chart]')?.querySelectorAll('h2 a.prc-Link-Link-85e08') ?? []];
    const allContributors = [
        ...contributorsToAdd,
        ...contributorLinks.map(({ href, textContent }) => {
            const username = getUsername(href);
            return {
                link: href,
                name: mappedNames.get(username) ?? textContent,
                username
            };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…