Questify: Horror fixes. (#1012)

This commit is contained in:
Etorix 2026-04-24 06:41:31 -07:00 • committed by GitHub
parent c94ae02d6e
commit 995d8831fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 2 deletions

View file

@ -1398,6 +1398,14 @@ export default definePlugin({
useQuestRerender,
patches: [
{
// Needed for GuildlessServerListItemComponent component in components.tsx
find: "=\"DOWNLOAD_APPS\";function",
replacement: {
match: /(?<=function\(\i,\i,\i\){\i.\i\(\i,{)(?=.{0,25000}?ariaHidden:!0,asContainer:!\i,children:\i}\)}var \i=\i\(\d+\);let (\i)=\i.forwardRef\(function)/,
replace: "GuildlessServerListItemComponent:()=>$1,"
}
},
{
// Hides Quests tab in the Discovery page.
find: "GLOBAL_DISCOVERY_SIDEBAR},",
@ -1649,8 +1657,13 @@ export default definePlugin({
},
{
// Encourages banners to load quicker if the setting is enabled.
match: /(warningHints:\i,)isVisibleInViewport:(\i)/,
replace: "$1isVisibleInViewport:$self.shouldPreloadQuestAssets()?true:$2"
match: /(hideAssets:)(!\i)/,
replace: "$1$self.shouldPreloadQuestAssets()?!1:$2"
},
{
// Encourages banners to load quicker if the setting is enabled.
match: /(showPlaceholder:)(!\i)/,
replace: "$1$self.shouldPreloadQuestAssets()?!1:$2"
},
{
// Encourages reward icons to load quicker if the setting is enabled.

View file

@ -12,6 +12,7 @@ import { JSX } from "react";
import { settings } from "../settings";
import { formatLowerBadge } from "./misc";
// Requires GuildlessServerListItemComponent export patch in index.tsx
// GuildlessServerListItem's built-in pill does not support unread state.
export const GuildlessServerListItemComponent = findComponentByCodeLazy("tooltip:", "lowerBadgeSize:");
export const GuildedServerListItemPillComponent = findComponentByCodeLazy('"pill":"empty"');