Merge branch 'main' into global-shortcuts
This commit is contained in:
@@ -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: {
|
||||||
|
|||||||
@@ -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";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user