Skip to content

Commit 54f47f5

Browse files
committed
popoutDates: always show discord icon, more clearer tooltips
1 parent 1cdb123 commit 54f47f5

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

src/popoutDates/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@ export const patches: Patch[] = [
88
replacement: (orig, createElement) =>
99
`${orig}${createElement}(require("popoutDates_component").default,{userId:arguments[0].user.id,guildId:arguments[0].guild?.id}),`
1010
}
11+
},
12+
13+
{
14+
find: ".memberSince,",
15+
replace: [
16+
// always show discord icon
17+
{
18+
match: /return (null==\i\|\|null==\i)\?.+?}\):(.+?)(\(0,\i\.jsx\)\("div",{className:\i\.divider}\)),/,
19+
replacement: (_, check, body, divider) => `return${body}${check}?null:${divider},${check}?null:`
20+
},
21+
22+
// change tooltips to be more clear
23+
{
24+
match: ".t.uvGmCw",
25+
replacement: ".t.sPph4O"
26+
},
27+
{
28+
match: /(?<=text:(\i)\.intl.+?)text:(\i\.name),/,
29+
replacement: (_, i18n, guildName) => `text:${i18n}.intl.format(${i18n}.t.FXREhY,{guildName:${guildName}}),`
30+
}
31+
]
1132
}
1233
];
1334

src/popoutDates/manifest.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"$schema": "https://moonlight-mod.github.io/manifest.schema.json",
33
"id": "popoutDates",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"meta": {
66
"name": "Popout Dates",
77
"tagline": "Restore join dates to the profile popout",
88
"authors": ["Cynosphere"],
99
"tags": ["fixes", "profiles"],
1010
"source": "https://github.com/Cynosphere/moonlight-extensions",
11-
"donate": "https://ko-fi.com/Cynosphere"
11+
"donate": "https://ko-fi.com/Cynosphere",
12+
"changelog": "Always show Discord icon when no guild, make the default tooltips more clearer"
1213
},
1314
"dependencies": ["spacepack", "common"],
1415
"apiLevel": 2

src/popoutDates/webpackModules/component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "@moonlight-mod/wp/react";
22
import spacepack from "@moonlight-mod/wp/spacepack_spacepack";
33
import ErrorBoundary from "@moonlight-mod/wp/common_ErrorBoundary";
44

5-
const MemberSince = spacepack.findByCode(".memberSince,")[0]?.exports?.Z;
5+
const MemberSince = spacepack.findByCode(`.member${""}Since,`)[0]?.exports?.Z;
66

77
export default function PopoutDates({ userId, guildId }: { userId: string; guildId?: string }) {
88
return (

0 commit comments

Comments
 (0)