fix broken patches

This commit is contained in:
Vendicated
2026-05-04 19:57:53 +02:00
parent dab413c376
commit 61ecf66936
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import { addPatch } from "./shared";
addPatch({
patches: [
// Discord Web blocks the devtools keybin on mac specifically, disable that
// Discord Web blocks the devtools key-bind on mac specifically, disable that
{
find: '"mod+alt+i"',
replacement: {
+2 -2
View File
@@ -11,13 +11,13 @@ addPatch({
{
find: "lastOutputSystemDevice.justChanged",
replacement: {
match: /(\i)\.\i\.getState\(\).neverShowModal/,
match: /\.getState\(\)\.neverShowModal(?=.{0,50}?(\i)\.lastDeviceConnected)/,
replace: "$& || $self.shouldIgnoreDevice($1)"
}
}
],
shouldIgnoreDevice(state: any) {
return Object.keys(state?.default?.lastDeviceConnected ?? {})?.[0] === "vencord-screen-share";
return Object.keys(state.lastDeviceConnected ?? {})[0] === "vencord-screen-share";
}
});
+3 -3
View File
@@ -11,13 +11,13 @@ addPatch({
{
find: 'setSinkId"in',
replacement: {
match: /return (\i)\?navigator\.mediaDevices\.enumerateDevices/,
replace: "return $1 ? $self.filteredDevices"
match: /navigator\.mediaDevices\.enumerateDevices\(\)/,
replace: "$self.getFilteredDevices()"
}
}
],
async filteredDevices() {
async getFilteredDevices() {
const original = await navigator.mediaDevices.enumerateDevices();
return original.filter(x => x.label !== "vencord-screen-share");
}
+2 -2
View File
@@ -9,10 +9,10 @@ import { addPatch } from "./shared";
addPatch({
patches: [
{
find: ".STREAMING_AUTO_STREAMER_MODE,",
find: ".STREAMING_AUTO_STREAMER_MODE,{",
replacement: {
// remove if (platformEmbedded) check from streamer mode toggle
match: /(?<=usePredicate.{0,20}?return )\i\.\i/g,
match: /(?<=\.STREAMING_AUTO_STREAMER_MODE,\{.{0,300}?usePredicate:.{0,20}return )\i\.\i(?=\})/g,
replace: "true"
}
}