Fix Broken Patches
This commit is contained in:
parent
9653e52851
commit
43b01e0c7c
4 changed files with 24 additions and 12 deletions
|
|
@ -125,7 +125,7 @@ export default definePlugin({
|
|||
]
|
||||
},
|
||||
{
|
||||
find: "#{intl::QUICKSWITCHER_PROTIP}",
|
||||
find: "#{intl::MfbDzS::raw}",
|
||||
replacement: {
|
||||
match: /(?<=renderResults\(\){.{0,100})let{query/,
|
||||
replace: "this.props.results = $self.filteredGuildResults(this.props.results);$&",
|
||||
|
|
|
|||
|
|
@ -866,7 +866,7 @@ export default definePlugin({
|
|||
find: ".isPureReactComponent=!0;",
|
||||
predicate: () => settings.store.uwuEverything,
|
||||
replacement: {
|
||||
match: /(\.defaultProps\).{0,80}return \i\(\i,\i,void 0,void 0,null,)(\i)\)/,
|
||||
match: /(\.defaultProps\).{0,80}return \i\(\i,\i,)(\i)\)/,
|
||||
replace: "$1$self.uwuifyProps($2))"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,8 +212,8 @@ export default definePlugin({
|
|||
find: "QUEST_HOME)},[]),",
|
||||
predicate: () => !getQuestifySettings().disableQuestsEverything && getQuestifySettings().disableSponsoredBanner,
|
||||
replacement: {
|
||||
match: /(?<=,{questHomeHero:(\i),isLoading:(\i)}=.{0,300}?ORBS_BALANCE_MENU}\)},\[\]\);)/,
|
||||
replace: "$1=null;$2=false;"
|
||||
match: /(?<=,{questHomeHero:(\i),isLoading:(\i),confirmedEmpty:\i}=.{0,300}?ORBS_BALANCE_MENU}\)},\[\]\);)/,
|
||||
replace: "$1=null;$2=false;$3=true;"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -487,7 +487,7 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// If we already applied Questify's sort, skip further sorting.
|
||||
match: /(?<=\{sortMethod:(\i).{0,750}?return )((\i).sort)/,
|
||||
match: /(?<=\{sortMethod:(\i).{0,800}?return )((\i).sort)/,
|
||||
replace: "$1===\"questify\"?$3:$2"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -280,10 +280,17 @@ export default definePlugin({
|
|||
patches: [
|
||||
// stolen from ViewIcons
|
||||
{
|
||||
find: 'backgroundColor:"COMPLETE"',
|
||||
find: '"--custom-cutout-radius":',
|
||||
replacement: {
|
||||
match: /(?<=backgroundImage.+?children:)!\i.{0,100}className:\i\.\i\}\)/,
|
||||
replace: "[$self.renderProfileTimezone(arguments[0]),$&]"
|
||||
match: /(?<=children:\[)\i.{0,100}className:\i\.\i\}\)/,
|
||||
replace: "$self.renderProfileTimezone(arguments[0]),$&"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: '"--custom-cutout-radius":',
|
||||
replacement: {
|
||||
match: /style:{(?=\.\.\.\i,backgroundImage:null!=(\i).{0,20}?\?`url\(\$\{\1\}\)`)/,
|
||||
replace: (_, bannerSrc) => `onClick:vcEvent=>${bannerSrc}!=null&&$self.openBanner(${bannerSrc},vcEvent),style:{cursor:${bannerSrc}!=null?"pointer":void 0,`
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -350,11 +357,16 @@ export default definePlugin({
|
|||
settings,
|
||||
getTime,
|
||||
|
||||
renderProfileTimezone: (props?: { user?: User; }) => {
|
||||
if (!settings.store.showProfileTime || !props?.user?.id) return null;
|
||||
if (props.user.id === UserStore.getCurrentUser().id && !settings.store.showOwnTimezone) return null;
|
||||
renderProfileTimezone: props => {
|
||||
if (!settings.store.showProfileTime || !props?.bannerSrc) return null;
|
||||
|
||||
return <TimestampComponent userId={props.user.id} type="profile" />;
|
||||
const match = /\/banners\/(\d+)\//.exec(props.bannerSrc);
|
||||
const userId = match?.[1];
|
||||
if (!userId) return null;
|
||||
|
||||
if (userId === UserStore.getCurrentUser().id && !settings.store.showOwnTimezone) return null;
|
||||
|
||||
return <TimestampComponent userId={userId} type="profile" />;
|
||||
},
|
||||
|
||||
renderMessageTimezone: (props?: { message?: Message; }) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue