Merge branch 'main' into global-shortcuts

This commit is contained in:
V
2026-05-10 14:22:31 +02:00
committed by GitHub
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import { addPatch } from "./shared";
addPatch({ addPatch({
patches: [ 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"', find: '"mod+alt+i"',
replacement: { replacement: {
+2 -2
View File
@@ -11,13 +11,13 @@ addPatch({
{ {
find: "lastOutputSystemDevice.justChanged", find: "lastOutputSystemDevice.justChanged",
replacement: { replacement: {
match: /(\i)\.\i\.getState\(\).neverShowModal/, match: /\.getState\(\)\.neverShowModal(?=.{0,50}?(\i)\.lastDeviceConnected)/,
replace: "$& || $self.shouldIgnoreDevice($1)" replace: "$& || $self.shouldIgnoreDevice($1)"
} }
} }
], ],
shouldIgnoreDevice(state: any) { 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', find: 'setSinkId"in',
replacement: { replacement: {
match: /return (\i)\?navigator\.mediaDevices\.enumerateDevices/, match: /navigator\.mediaDevices\.enumerateDevices\(\)/,
replace: "return $1 ? $self.filteredDevices" replace: "$self.getFilteredDevices()"
} }
} }
], ],
async filteredDevices() { async getFilteredDevices() {
const original = await navigator.mediaDevices.enumerateDevices(); const original = await navigator.mediaDevices.enumerateDevices();
return original.filter(x => x.label !== "vencord-screen-share"); return original.filter(x => x.label !== "vencord-screen-share");
} }
+2 -2
View File
@@ -9,10 +9,10 @@ import { addPatch } from "./shared";
addPatch({ addPatch({
patches: [ patches: [
{ {
find: ".STREAMING_AUTO_STREAMER_MODE,", find: ".STREAMING_AUTO_STREAMER_MODE,{",
replacement: { replacement: {
// remove if (platformEmbedded) check from streamer mode toggle // 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" replace: "true"
} }
} }