mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 18:06:22 +00:00
Added license header, avoid regex in finds, made requested edits
This commit is contained in:
parent
cacbdc1f1d
commit
7e16a1f954
1 changed files with 22 additions and 8 deletions
|
@ -1,14 +1,28 @@
|
||||||
|
/*
|
||||||
|
* 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 { Devs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NeverPausePreviews",
|
name: "NeverPausePreviews",
|
||||||
description: "Prevents in-call/PiP previews (screenshare, streams, etc) from pausing even if the client loses focus",
|
description: "Prevents in-call/PiP previews (screenshare, streams, etc) from pausing even if the client loses focus",
|
||||||
authors: [
|
authors: [Devs.vappster],
|
||||||
{
|
|
||||||
id: 747192967311261748n,
|
|
||||||
name: "vappster",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
patches: [
|
patches: [
|
||||||
{ //picture-in-picture player patch
|
{ //picture-in-picture player patch
|
||||||
find: "streamerPaused()",
|
find: "streamerPaused()",
|
||||||
|
@ -18,14 +32,14 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ //in-call player patch #1 (keep stream playing)
|
{ //in-call player patch #1 (keep stream playing)
|
||||||
find: /videoComponent:.{1,2},className:/,
|
find: "VideoStreamFit:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /paused:.{1,2}}\)/,
|
match: /paused:.{1,2}}\)/,
|
||||||
replace: "paused:false})"
|
replace: "paused:false})"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ //in-call player patch #2 (disable "your stream is still running" text overlay)
|
{ //in-call player patch #2 (disable "your stream is still running" text overlay)
|
||||||
find: /let{mainText:.{1,2},supportingText:.{1,2}/,
|
find: "let{mainText:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /let{.{0,120};/,
|
match: /let{.{0,120};/,
|
||||||
replace: "return;"
|
replace: "return;"
|
||||||
|
|
Loading…
Reference in a new issue