Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yofukashino committed Oct 5, 2024
1 parent 3f25784 commit e4f6c03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/requiredModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Modules.loadModules = async (): Promise<void> => {

Modules.ImageConstructor ??= await webpack
.waitForModule<Types.GenericModule & Record<string, RegExp>>(
webpack.filters.bySource("/\\.(gif|webp)($|\\?|#)/i"),
webpack.filters.bySource("/\\.gif($|\\?|#)/i"),
{
timeout: 10000,
},
Expand Down
9 changes: 7 additions & 2 deletions src/plaintextPatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ export default [
{
find: "AppIconPersistedStoreState",
replacements: [
{
match: /\w+\.\w+\.canUsePremiumAppIcons\(\w+\.default\.getCurrentUser\(\)\)/,
replace: (premium) =>
`(replugged?.plugins?.getExports('dev.tharki.LegalDiscordBypasses')?._getAppIconsEnabled()||${premium})`,
},
{
match: /get isUpsellPreview\(\){return (\w+)/,
replace: (_, value: string) =>
`get isUpsellPreview(){return !(replugged?.plugins?.getExports('dev.tharki.DiscordBypasses')?._getAppIconsEnabled() || !${value})`,
`get isUpsellPreview(){return !(replugged?.plugins?.getExports('dev.tharki.LegalDiscordBypasses')?._getAppIconsEnabled() || !${value})`,
},
],
},
Expand All @@ -60,7 +65,7 @@ export default [
{
match: /\w+\.\w+\.isPremium\(\w+\.default\.getCurrentUser\(\)\)/,
replace: (premium) =>
`replugged?.plugins?.getExports('dev.tharki.DiscordBypasses')?._getAppIconsEnabled()||${premium}`,
`(replugged?.plugins?.getExports('dev.tharki.LegalDiscordBypasses')?._getAppIconsEnabled()||${premium})`,
},
],
},
Expand Down

0 comments on commit e4f6c03

Please # to comment.