fix VolumeBooster & UserVoiceShow (#4003)

This commit is contained in:
sadan4 2026-02-24 18:41:37 -05:00 • committed by GitHub
parent bf799f79b6
commit 710c391697
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 10 deletions

View file

@ -59,8 +59,8 @@ export default definePlugin({
{
find: "#{intl::USER_PROFILE_PRONOUNS}",
replacement: {
match: /(\i).isVerifiedBot\(\)}\),/,
replace: "$&$self.VoiceChannelIndicator({userId:$1.id,isProfile:true}),"
match: /(?<=children:\[\i," ",\i)(?=\])/,
replace: ",$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id,isProfile:true})"
},
predicate: () => settings.store.showInUserProfileModal
},

View file

@ -55,16 +55,21 @@ export default definePlugin({
patches: [
// Change the max volume for sliders to allow for values above 200
...[
"#{intl::USER_VOLUME}",
"currentVolume:"
].map(find => ({
find,
{
find: "#{intl::USER_VOLUME}",
replacement: {
match: /(?<=maxValue:)\i\.\i\?(\d+?):(\d+?)(?=,)/,
replace: (_, higherMaxVolume, minorMaxVolume) => `${higherMaxVolume}*$self.settings.store.multiplier`
match: /(?<=maxValue:)\i\.isPlatformEmbedded\?(\i\.\i):\i\.\i(?=,)/,
replace: (_, higherMaxVolume) => `${higherMaxVolume}*$self.settings.store.multiplier`
}
})),
},
// Change the max volume for sliders to allow for values above 200
{
find: "currentVolume:",
replacement: {
match: /(?<=maxValue:)\i\.\i\?(\d+?):\d+?(?=,)/,
replace: (_, higherMaxVolume) => `${higherMaxVolume}*$self.settings.store.multiplier`
}
},
// Patches needed for web/vesktop
{
find: "streamSourceNode",