mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-24 09:09:12 -05:00
Fix USRBG not showing up in VC
This commit is contained in:
parent
51f78e5caf
commit
f57580a4ba
2 changed files with 6 additions and 0 deletions
|
@ -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",
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Add table
Reference in a new issue