Fix USRBG not showing up in VC

This commit is contained in:
thororen1234 2025-02-08 16:02:15 -05:00
parent 51f78e5caf
commit f57580a4ba
2 changed files with 6 additions and 0 deletions

View file

@ -42,6 +42,9 @@ export default definePlugin({
if (Settings.plugins.USRBG.enabled && Settings.plugins.USRBG.voiceBackground) { if (Settings.plugins.USRBG.enabled && Settings.plugins.USRBG.voiceBackground) {
const USRBG = (Vencord.Plugins.plugins.USRBG as unknown as iUSRBG); const USRBG = (Vencord.Plugins.plugins.USRBG as unknown as iUSRBG);
if (USRBG.userHasBackground(participantUserId)) { if (USRBG.userHasBackground(participantUserId)) {
document.querySelectorAll('[class*="background_"]').forEach(element => {
(element as HTMLElement).style.backgroundColor = "transparent";
});
return { return {
backgroundImage: `url(${USRBG.getImageUrl(participantUserId)})`, backgroundImage: `url(${USRBG.getImageUrl(participantUserId)})`,
backgroundSize: "cover", backgroundSize: "cover",

View file

@ -84,6 +84,9 @@ export default definePlugin({
getVoiceBackgroundStyles({ className, participantUserId }: any) { getVoiceBackgroundStyles({ className, participantUserId }: any) {
if (className.includes("tile_")) { if (className.includes("tile_")) {
if (this.userHasBackground(participantUserId)) { if (this.userHasBackground(participantUserId)) {
document.querySelectorAll('[class*="background_"]').forEach(element => {
(element as HTMLElement).style.backgroundColor = "transparent";
});
return { return {
backgroundImage: `url(${this.getImageUrl(participantUserId)})`, backgroundImage: `url(${this.getImageUrl(participantUserId)})`,
backgroundSize: "cover", backgroundSize: "cover",