Compare commits
1 Commits
4b90a5feec
...
c45852d693
| Author | SHA1 | Date | |
|---|---|---|---|
| c45852d693 |
23
actors.mjs
23
actors.mjs
@@ -243,12 +243,19 @@ export const socials = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const platformsByHostname = Object.fromEntries(Object.entries(socials.urls).map(([platform, url]) => {
|
export const platformsByHostname = {
|
||||||
const { hostname, pathname } = new URL(url);
|
...Object.fromEntries(Object.entries(socials.urls).map(([platform, url]) => {
|
||||||
|
const { hostname, pathname } = new URL(url);
|
||||||
|
|
||||||
return [hostname, {
|
return [hostname, {
|
||||||
platform,
|
platform,
|
||||||
pathname: decodeURIComponent(pathname),
|
pathname: decodeURIComponent(pathname),
|
||||||
url,
|
url,
|
||||||
}];
|
}];
|
||||||
}));
|
})),
|
||||||
|
'twitter.com': {
|
||||||
|
platform: 'twitter',
|
||||||
|
pathname: '/{handle}',
|
||||||
|
url: 'https://twitter.com/{handle}',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user