mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 21:33:35 -05:00
NeverPausePreviews
This commit is contained in:
parent
55078da2e4
commit
6c58d118af
2 changed files with 56 additions and 3 deletions
49
src/equicordplugins/neverPausePreviews/index.ts
Normal file
49
src/equicordplugins/neverPausePreviews/index.ts
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Vencord, a modification for Discord's desktop app
|
||||||
|
* Copyright (c) 2022 Vendicated and contributors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { EquicordDevs } from "@utils/constants";
|
||||||
|
import definePlugin from "@utils/types";
|
||||||
|
|
||||||
|
export default definePlugin({
|
||||||
|
name: "NeverPausePreviews",
|
||||||
|
description: "Prevents in-call/PiP previews (screenshare, streams, etc) from pausing even if the client loses focus",
|
||||||
|
authors: [EquicordDevs.vappstar],
|
||||||
|
patches: [
|
||||||
|
{
|
||||||
|
find: "streamerPaused()",
|
||||||
|
replacement: {
|
||||||
|
match: /return null![^}]+/,
|
||||||
|
replace: "return false"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: "onSpinnerStarted():null",
|
||||||
|
replacement: {
|
||||||
|
match: /paused:\i([^=])/,
|
||||||
|
replace: "paused:false$1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: "let{mainText:",
|
||||||
|
replacement: {
|
||||||
|
match: /let{[^;]+/,
|
||||||
|
replace: "return"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
});
|
|
@ -942,11 +942,11 @@ export const EquicordDevs = Object.freeze({
|
||||||
},
|
},
|
||||||
Z1xus: {
|
Z1xus: {
|
||||||
name: "Z1xus",
|
name: "Z1xus",
|
||||||
id: 377450600797044746n,
|
id: 377450600797044746n
|
||||||
},
|
},
|
||||||
Oggetto: {
|
Oggetto: {
|
||||||
name: "Oggetto",
|
name: "Oggetto",
|
||||||
id: 619203349954166804n,
|
id: 619203349954166804n
|
||||||
},
|
},
|
||||||
zyqunix: {
|
zyqunix: {
|
||||||
name: "zyqunix",
|
name: "zyqunix",
|
||||||
|
@ -954,12 +954,16 @@ export const EquicordDevs = Object.freeze({
|
||||||
},
|
},
|
||||||
examplegit: {
|
examplegit: {
|
||||||
name: "example.user",
|
name: "example.user",
|
||||||
id: 175411535357673473n,
|
id: 175411535357673473n
|
||||||
},
|
},
|
||||||
Loukios: {
|
Loukios: {
|
||||||
name: "Loukios",
|
name: "Loukios",
|
||||||
id: 211461918127292416n
|
id: 211461918127292416n
|
||||||
},
|
},
|
||||||
|
vappstar: {
|
||||||
|
name: "vappstar",
|
||||||
|
id: 747192967311261748n
|
||||||
|
}
|
||||||
} satisfies Record<string, Dev>);
|
} satisfies Record<string, Dev>);
|
||||||
|
|
||||||
// iife so #__PURE__ works correctly
|
// iife so #__PURE__ works correctly
|
||||||
|
|
Loading…
Reference in a new issue