mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-21 15:48:52 -05:00
feat(plugin): NoMirroredCamera
This commit is contained in:
parent
1e5e6d222b
commit
202de5af0b
1 changed files with 41 additions and 0 deletions
41
src/equicordplugins/noMirroredCamera/index.tsx
Normal file
41
src/equicordplugins/noMirroredCamera/index.tsx
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoMirroredCamera",
|
||||
description: "Prevents the camera from being mirrored on your screen",
|
||||
authors: [EquicordDevs.nyx],
|
||||
|
||||
patches: [
|
||||
// When focused on voice channel or group chat voice call
|
||||
{
|
||||
find: /\i\?\i.\i.SELF_VIDEO/,
|
||||
replacement: {
|
||||
match: /mirror:\i/,
|
||||
replace: "mirror:!1"
|
||||
}
|
||||
},
|
||||
// Popout camera when not focused on voice channel
|
||||
{
|
||||
find: ".mirror]:",
|
||||
replacement: {
|
||||
match: /\[(\i).mirror]:\i/,
|
||||
replace: "[$1.mirror]:!1"
|
||||
}
|
||||
},
|
||||
// Overriding css on Preview Camera/Change Video Background popup
|
||||
{
|
||||
find: ".cameraPreview,",
|
||||
replacement: {
|
||||
match: /className:\i.camera,/,
|
||||
replace: "$&style:{transform: \"scalex(1)\"},"
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
Loading…
Add table
Reference in a new issue