mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 05:13:29 -05:00
Merge branch 'dev'
This commit is contained in:
parent
2d49382887
commit
60f69e4503
8 changed files with 79 additions and 68 deletions
|
@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
|||
|
||||
### Extra included plugins
|
||||
<details>
|
||||
<summary>151 additional plugins</summary>
|
||||
<summary>152 additional plugins</summary>
|
||||
|
||||
### All Platforms
|
||||
- AllCallTimers by MaxHerbold & D3SOX
|
||||
|
@ -70,6 +70,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
|||
- GrammarFix by S€th
|
||||
- HideChatButtons by iamme
|
||||
- HideMessage by Hanzy
|
||||
- HideScreenShare by thororen
|
||||
- HideServers by bepvte
|
||||
- HolyNotes by Wolfie
|
||||
- HomeTyping by Samwich
|
||||
|
|
|
@ -109,8 +109,8 @@ function EquicordSettings() {
|
|||
title: "Enable window transparency.",
|
||||
note: "You need a theme that supports transparency or this will do nothing. Requires a full restart!",
|
||||
warning: {
|
||||
enabled: true,
|
||||
message: "This will stop the window from being resizable.",
|
||||
enabled: isWindows,
|
||||
message: "Enabling this will prevent you from snapping this window.",
|
||||
},
|
||||
},
|
||||
!IS_WEB &&
|
||||
|
|
|
@ -25,7 +25,7 @@ export default definePlugin({
|
|||
description: "Disables most of Discord's animations.",
|
||||
authors: [EquicordDevs.seth],
|
||||
start() {
|
||||
this.springs = findAll((mod) => {
|
||||
this.springs = findAll(mod => {
|
||||
if (!mod.Globals) return false;
|
||||
return true;
|
||||
});
|
|
@ -142,6 +142,11 @@ const settings = definePluginSettings({
|
|||
default: "0.2",
|
||||
onChange: injectCSS
|
||||
},
|
||||
colorsEnabled: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Whether or not to enable theming",
|
||||
onChange: () => injectCSS()
|
||||
},
|
||||
ColorPreset: {
|
||||
type: OptionType.SELECT,
|
||||
description: "Some pre-made color presets (more soon hopefully)",
|
||||
|
@ -238,18 +243,20 @@ function parseFontContent() {
|
|||
return fontName;
|
||||
}
|
||||
function injectCSS() {
|
||||
if (Settings.plugins.Glide.enabled) {
|
||||
|
||||
const fontName = parseFontContent();
|
||||
const theCSS = getCSS(fontName);
|
||||
const fontName = parseFontContent();
|
||||
const theCSS = getCSS(fontName);
|
||||
|
||||
var elementToRemove = document.getElementById("GlideStyleInjection");
|
||||
if (elementToRemove) {
|
||||
elementToRemove.remove();
|
||||
const elementToRemove = document.getElementById("GlideStyleInjection");
|
||||
if (elementToRemove) {
|
||||
elementToRemove.remove();
|
||||
}
|
||||
const styleElement = document.createElement("style");
|
||||
styleElement.id = "GlideStyleInjection";
|
||||
styleElement.textContent = theCSS;
|
||||
document.documentElement.appendChild(styleElement);
|
||||
}
|
||||
const styleElement = document.createElement("style");
|
||||
styleElement.id = "GlideStyleInjection";
|
||||
styleElement.textContent = theCSS;
|
||||
document.documentElement.appendChild(styleElement);
|
||||
}
|
||||
|
||||
function getCSS(fontName) {
|
||||
|
@ -318,13 +325,15 @@ function getCSS(fontName) {
|
|||
{
|
||||
--animspeed: ${Settings.plugins.Glide.animationSpeed + "s"};
|
||||
--font-primary: ${(fontName.length > 0 ? fontName : "Nunito")};
|
||||
--accent: #${Settings.plugins.Glide.Accent};
|
||||
--bgcol: #${Settings.plugins.Glide.Primary};
|
||||
--text: #${Settings.plugins.Glide.Text};
|
||||
--brand: #${Settings.plugins.Glide.Brand};
|
||||
--mutedtext: ${mute(Settings.plugins.Glide.Text, 20)};
|
||||
--mutedbrand: ${mute(Settings.plugins.Glide.Brand, 10)};
|
||||
--mutedaccent: ${mute(Settings.plugins.Glide.Accent, 10)};
|
||||
${Settings.plugins.Glide.colorsEnabled ? `
|
||||
--accent: #${Settings.plugins.Glide.Accent};
|
||||
--bgcol: #${Settings.plugins.Glide.Primary};
|
||||
--text: #${Settings.plugins.Glide.Text};
|
||||
--brand: #${Settings.plugins.Glide.Brand};
|
||||
--mutedtext: ${mute(Settings.plugins.Glide.Text, 20)};
|
||||
--mutedbrand: ${mute(Settings.plugins.Glide.Brand, 10)};
|
||||
--mutedaccent: ${mute(Settings.plugins.Glide.Accent, 10)};
|
||||
` : ""}
|
||||
}
|
||||
:root
|
||||
{
|
||||
|
@ -341,7 +350,7 @@ function getCSS(fontName) {
|
|||
|
||||
|
||||
/*COLOR ASSIGNING (most of these probably effect more than whats commented)*/
|
||||
|
||||
${Settings.plugins.Glide.colorsEnabled ? `
|
||||
/*accent based*/
|
||||
|
||||
/*buttons*/
|
||||
|
@ -521,7 +530,7 @@ function getCSS(fontName) {
|
|||
background-color: var(--primary);
|
||||
}
|
||||
${settings.store.pastelStatuses ?
|
||||
`
|
||||
`
|
||||
/*Pastel statuses*/
|
||||
rect[fill='#23a55a'], svg[fill='#23a55a'] {
|
||||
fill: #80c968 !important;
|
||||
|
@ -546,7 +555,7 @@ function getCSS(fontName) {
|
|||
.unread_d8bfb3
|
||||
{
|
||||
background-color: var(--text) !important;
|
||||
}
|
||||
}` : ""}
|
||||
|
||||
/*ROUNDING (rounding)*/
|
||||
|
||||
|
@ -642,7 +651,7 @@ function getCSS(fontName) {
|
|||
}
|
||||
|
||||
/*Hide icon on file uploading status*/
|
||||
.icon_b52bef
|
||||
.icon_f46c86
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
|
35
src/equicordplugins/hideScreenShare/index.ts
Normal file
35
src/equicordplugins/hideScreenShare/index.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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: "HideScreenShare",
|
||||
description: "Hide your screen share by default",
|
||||
authors: [EquicordDevs.thororen],
|
||||
patches: [
|
||||
{
|
||||
find: '"self-stream-hide"',
|
||||
replacement: {
|
||||
match: /return (\i)?(.*?onConfirm:\(\)=>((\i)\(!\i\)))/,
|
||||
replace: "let $4 = null; if ($4 !== null) return $3; return $1$2"
|
||||
}
|
||||
}
|
||||
],
|
||||
});
|
|
@ -28,7 +28,7 @@ export default definePlugin({
|
|||
authors: [EquicordDevs.vappstar],
|
||||
settingsAboutComponent: () => <>
|
||||
<Forms.FormText className="platform-warning">
|
||||
This plugin will cause discord to use more resources than normal.
|
||||
This plugin will cause discord to use more resources than normal
|
||||
</Forms.FormText>
|
||||
</>,
|
||||
patches: [
|
||||
|
|
|
@ -71,13 +71,16 @@ export async function installExt(id: string) {
|
|||
// React Devtools v4.25
|
||||
// v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843
|
||||
// Unfortunately, Google does not serve old versions, so this is the only way
|
||||
// This zip file is pinned to long commit hash so it cannot be changed remotely
|
||||
? "https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip"
|
||||
: `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=32`;
|
||||
: `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=${process.versions.chrome}`;
|
||||
|
||||
const buf = await get(url, {
|
||||
headers: {
|
||||
"User-Agent": "Equicord (https://github.com/Equicord/Equicord)"
|
||||
"User-Agent": `Electron ${process.versions.electron} ~ Equicord (https://github.com/Equicord/Equicord)`
|
||||
}
|
||||
});
|
||||
|
||||
await extract(crxToZip(buf), extDir).catch(console.error);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,7 @@ const opt = (description: string) => ({
|
|||
const settings = definePluginSettings({
|
||||
showTimeouts: opt("Show member timeout icons in chat."),
|
||||
showInvitesPaused: opt("Show the invites paused tooltip in the server list."),
|
||||
showModView: opt("Show the member mod view context menu item in all servers."),
|
||||
disableDiscoveryFilters: opt("Disable filters in Server Discovery search that hide servers that don't meet discovery criteria."),
|
||||
disableDisallowedDiscoveryFilters: opt("Disable filters in Server Discovery search that hide NSFW & disallowed servers."),
|
||||
showModView: opt("Show the member mod view context menu item in all servers.")
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
|
@ -40,6 +38,8 @@ export default definePlugin({
|
|||
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
||||
description: "Displays various hidden & moderator-only things regardless of permissions.",
|
||||
authors: [Devs.Dolfies],
|
||||
settings,
|
||||
|
||||
patches: [
|
||||
{
|
||||
find: "showCommunicationDisabledStyles",
|
||||
|
@ -82,43 +82,6 @@ export default definePlugin({
|
|||
match: /\i(?=\?null)/,
|
||||
replace: "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
find: "prod_discoverable_guilds",
|
||||
predicate: () => settings.store.disableDiscoveryFilters,
|
||||
replacement: {
|
||||
match: /\{"auto_removed:.*?\}/,
|
||||
replace: "{}"
|
||||
}
|
||||
},
|
||||
// remove the 200 server minimum
|
||||
{
|
||||
find: '">200"',
|
||||
predicate: () => settings.store.disableDiscoveryFilters,
|
||||
replacement: {
|
||||
match: '">200"',
|
||||
replace: '">0"'
|
||||
}
|
||||
},
|
||||
// empty word filter
|
||||
{
|
||||
find: '"pepe","nude"',
|
||||
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
||||
replacement: {
|
||||
match: /(?<=[?=])\["pepe",.+?\]/,
|
||||
replace: "[]",
|
||||
},
|
||||
},
|
||||
// patch request that queries if term is allowed
|
||||
{
|
||||
find: ".GUILD_DISCOVERY_VALID_TERM,query:",
|
||||
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
||||
all: true,
|
||||
replacement: {
|
||||
match: /\i\.\i\.get\(\{url:\i\.\i\.GUILD_DISCOVERY_VALID_TERM,query:\{term:\i\},oldFormErrors:!0,rejectWithError:!1\}\)/g,
|
||||
replace: "Promise.resolve({ body: { valid: true } })"
|
||||
}
|
||||
}
|
||||
],
|
||||
settings,
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue