-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(blockKrisp): add patches and make available for web
- Loading branch information
Showing
6 changed files
with
42 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Vencord, a Discord client mod | ||
* Copyright (c) 2024 Vendicated and contributors | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
*/ | ||
|
||
import { Devs } from "@utils/constants"; | ||
import definePlugin from "@utils/types"; | ||
|
||
export default definePlugin({ | ||
name: "BlockKrisp", | ||
description: "Prevent Krisp from loading", | ||
authors: [Devs.D3SOX], | ||
patches: [ | ||
// Block loading modules on Desktop | ||
{ | ||
find: "Failed to load Krisp module", | ||
replacement: { | ||
match: /await (\i).default.ensureModule\("discord_krisp"\)/, | ||
replace: "throw new Error();$&" | ||
} | ||
}, | ||
// Block loading modules on Web | ||
{ | ||
find: "krisp_browser_models", | ||
replacement: { | ||
match: /getKrispSDK:function\(\)\{/, | ||
replace: "$&return null;" | ||
} | ||
}, | ||
// Set Krisp to not supported | ||
{ | ||
find: "\"shouldSkipMuteUnmuteSound\"", | ||
replacement: { | ||
match: /isNoiseCancellationSupported\(\)\{/, | ||
replace: "$&return false;" | ||
} | ||
} | ||
], | ||
}); |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters