fix VolumeBooster & UserVoiceShow (#4003)
This commit is contained in:
parent
bf799f79b6
commit
710c391697
2 changed files with 15 additions and 10 deletions
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue