usrbg: fix (#1853)

This commit is contained in:
AutumnVN 2023-10-25 19:59:35 +07:00 committed by V
parent 7ee9a8bb99
commit 322ecc5e88
2 changed files with 6 additions and 6 deletions

View file

@ -7,6 +7,6 @@
top: 76px; top: 76px;
} }
[style*="background-image"] [class*="background-"] { [style*="background-image"] [class*="background_"] {
background-color: transparent !important; background-color: transparent !important;
} }

View file

@ -59,8 +59,8 @@ export default definePlugin({
replace: "$self.premiumHook($1)||$&" replace: "$self.premiumHook($1)||$&"
}, },
{ {
match: /(\i)\.bannerSrc,/, match: /(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,
replace: "$self.useBannerHook($1)," replace: "$1.bannerSrc=$self.useBannerHook($1);"
}, },
{ {
match: /\?\(0,\i\.jsx\)\(\i,{type:\i,shown/, match: /\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,
@ -73,8 +73,8 @@ export default definePlugin({
predicate: () => settings.store.voiceBackground, predicate: () => settings.store.voiceBackground,
replacement: [ replacement: [
{ {
match: /(\i)\.style,/, match: /(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,
replace: "$self.voiceBackgroundHook($1)," replace: "$1.style=$self.voiceBackgroundHook($1);"
} }
] ]
} }
@ -90,7 +90,7 @@ export default definePlugin({
}, },
voiceBackgroundHook({ className, participantUserId }: any) { voiceBackgroundHook({ className, participantUserId }: any) {
if (className.includes("tile-")) { if (className.includes("tile_")) {
if (data[participantUserId]) { if (data[participantUserId]) {
return { return {
backgroundImage: `url(${data[participantUserId]})`, backgroundImage: `url(${data[participantUserId]})`,