mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 22:23:02 -04: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
|
### Extra included plugins
|
||||||
<details>
|
<details>
|
||||||
<summary>151 additional plugins</summary>
|
<summary>152 additional plugins</summary>
|
||||||
|
|
||||||
### All Platforms
|
### All Platforms
|
||||||
- AllCallTimers by MaxHerbold & D3SOX
|
- 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
|
- GrammarFix by S€th
|
||||||
- HideChatButtons by iamme
|
- HideChatButtons by iamme
|
||||||
- HideMessage by Hanzy
|
- HideMessage by Hanzy
|
||||||
|
- HideScreenShare by thororen
|
||||||
- HideServers by bepvte
|
- HideServers by bepvte
|
||||||
- HolyNotes by Wolfie
|
- HolyNotes by Wolfie
|
||||||
- HomeTyping by Samwich
|
- HomeTyping by Samwich
|
||||||
|
|
|
@ -109,8 +109,8 @@ function EquicordSettings() {
|
||||||
title: "Enable window transparency.",
|
title: "Enable window transparency.",
|
||||||
note: "You need a theme that supports transparency or this will do nothing. Requires a full restart!",
|
note: "You need a theme that supports transparency or this will do nothing. Requires a full restart!",
|
||||||
warning: {
|
warning: {
|
||||||
enabled: true,
|
enabled: isWindows,
|
||||||
message: "This will stop the window from being resizable.",
|
message: "Enabling this will prevent you from snapping this window.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
!IS_WEB &&
|
!IS_WEB &&
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default definePlugin({
|
||||||
description: "Disables most of Discord's animations.",
|
description: "Disables most of Discord's animations.",
|
||||||
authors: [EquicordDevs.seth],
|
authors: [EquicordDevs.seth],
|
||||||
start() {
|
start() {
|
||||||
this.springs = findAll((mod) => {
|
this.springs = findAll(mod => {
|
||||||
if (!mod.Globals) return false;
|
if (!mod.Globals) return false;
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
|
@ -142,6 +142,11 @@ const settings = definePluginSettings({
|
||||||
default: "0.2",
|
default: "0.2",
|
||||||
onChange: injectCSS
|
onChange: injectCSS
|
||||||
},
|
},
|
||||||
|
colorsEnabled: {
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
description: "Whether or not to enable theming",
|
||||||
|
onChange: () => injectCSS()
|
||||||
|
},
|
||||||
ColorPreset: {
|
ColorPreset: {
|
||||||
type: OptionType.SELECT,
|
type: OptionType.SELECT,
|
||||||
description: "Some pre-made color presets (more soon hopefully)",
|
description: "Some pre-made color presets (more soon hopefully)",
|
||||||
|
@ -238,18 +243,20 @@ function parseFontContent() {
|
||||||
return fontName;
|
return fontName;
|
||||||
}
|
}
|
||||||
function injectCSS() {
|
function injectCSS() {
|
||||||
|
if (Settings.plugins.Glide.enabled) {
|
||||||
|
|
||||||
const fontName = parseFontContent();
|
const fontName = parseFontContent();
|
||||||
const theCSS = getCSS(fontName);
|
const theCSS = getCSS(fontName);
|
||||||
|
|
||||||
var elementToRemove = document.getElementById("GlideStyleInjection");
|
const elementToRemove = document.getElementById("GlideStyleInjection");
|
||||||
if (elementToRemove) {
|
if (elementToRemove) {
|
||||||
elementToRemove.remove();
|
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) {
|
function getCSS(fontName) {
|
||||||
|
@ -318,13 +325,15 @@ function getCSS(fontName) {
|
||||||
{
|
{
|
||||||
--animspeed: ${Settings.plugins.Glide.animationSpeed + "s"};
|
--animspeed: ${Settings.plugins.Glide.animationSpeed + "s"};
|
||||||
--font-primary: ${(fontName.length > 0 ? fontName : "Nunito")};
|
--font-primary: ${(fontName.length > 0 ? fontName : "Nunito")};
|
||||||
--accent: #${Settings.plugins.Glide.Accent};
|
${Settings.plugins.Glide.colorsEnabled ? `
|
||||||
--bgcol: #${Settings.plugins.Glide.Primary};
|
--accent: #${Settings.plugins.Glide.Accent};
|
||||||
--text: #${Settings.plugins.Glide.Text};
|
--bgcol: #${Settings.plugins.Glide.Primary};
|
||||||
--brand: #${Settings.plugins.Glide.Brand};
|
--text: #${Settings.plugins.Glide.Text};
|
||||||
--mutedtext: ${mute(Settings.plugins.Glide.Text, 20)};
|
--brand: #${Settings.plugins.Glide.Brand};
|
||||||
--mutedbrand: ${mute(Settings.plugins.Glide.Brand, 10)};
|
--mutedtext: ${mute(Settings.plugins.Glide.Text, 20)};
|
||||||
--mutedaccent: ${mute(Settings.plugins.Glide.Accent, 10)};
|
--mutedbrand: ${mute(Settings.plugins.Glide.Brand, 10)};
|
||||||
|
--mutedaccent: ${mute(Settings.plugins.Glide.Accent, 10)};
|
||||||
|
` : ""}
|
||||||
}
|
}
|
||||||
:root
|
:root
|
||||||
{
|
{
|
||||||
|
@ -341,7 +350,7 @@ function getCSS(fontName) {
|
||||||
|
|
||||||
|
|
||||||
/*COLOR ASSIGNING (most of these probably effect more than whats commented)*/
|
/*COLOR ASSIGNING (most of these probably effect more than whats commented)*/
|
||||||
|
${Settings.plugins.Glide.colorsEnabled ? `
|
||||||
/*accent based*/
|
/*accent based*/
|
||||||
|
|
||||||
/*buttons*/
|
/*buttons*/
|
||||||
|
@ -521,7 +530,7 @@ function getCSS(fontName) {
|
||||||
background-color: var(--primary);
|
background-color: var(--primary);
|
||||||
}
|
}
|
||||||
${settings.store.pastelStatuses ?
|
${settings.store.pastelStatuses ?
|
||||||
`
|
`
|
||||||
/*Pastel statuses*/
|
/*Pastel statuses*/
|
||||||
rect[fill='#23a55a'], svg[fill='#23a55a'] {
|
rect[fill='#23a55a'], svg[fill='#23a55a'] {
|
||||||
fill: #80c968 !important;
|
fill: #80c968 !important;
|
||||||
|
@ -546,7 +555,7 @@ function getCSS(fontName) {
|
||||||
.unread_d8bfb3
|
.unread_d8bfb3
|
||||||
{
|
{
|
||||||
background-color: var(--text) !important;
|
background-color: var(--text) !important;
|
||||||
}
|
}` : ""}
|
||||||
|
|
||||||
/*ROUNDING (rounding)*/
|
/*ROUNDING (rounding)*/
|
||||||
|
|
||||||
|
@ -642,7 +651,7 @@ function getCSS(fontName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Hide icon on file uploading status*/
|
/*Hide icon on file uploading status*/
|
||||||
.icon_b52bef
|
.icon_f46c86
|
||||||
{
|
{
|
||||||
display: none;
|
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],
|
authors: [EquicordDevs.vappstar],
|
||||||
settingsAboutComponent: () => <>
|
settingsAboutComponent: () => <>
|
||||||
<Forms.FormText className="platform-warning">
|
<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>
|
</Forms.FormText>
|
||||||
</>,
|
</>,
|
||||||
patches: [
|
patches: [
|
||||||
|
|
|
@ -71,13 +71,16 @@ export async function installExt(id: string) {
|
||||||
// React Devtools v4.25
|
// React Devtools v4.25
|
||||||
// v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843
|
// 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
|
// 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://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, {
|
const buf = await get(url, {
|
||||||
headers: {
|
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);
|
await extract(crxToZip(buf), extDir).catch(console.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,7 @@ const opt = (description: string) => ({
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
showTimeouts: opt("Show member timeout icons in chat."),
|
showTimeouts: opt("Show member timeout icons in chat."),
|
||||||
showInvitesPaused: opt("Show the invites paused tooltip in the server list."),
|
showInvitesPaused: opt("Show the invites paused tooltip in the server list."),
|
||||||
showModView: opt("Show the member mod view context menu item in all servers."),
|
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."),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
|
@ -40,6 +38,8 @@ export default definePlugin({
|
||||||
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
||||||
description: "Displays various hidden & moderator-only things regardless of permissions.",
|
description: "Displays various hidden & moderator-only things regardless of permissions.",
|
||||||
authors: [Devs.Dolfies],
|
authors: [Devs.Dolfies],
|
||||||
|
settings,
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "showCommunicationDisabledStyles",
|
find: "showCommunicationDisabledStyles",
|
||||||
|
@ -82,43 +82,6 @@ export default definePlugin({
|
||||||
match: /\i(?=\?null)/,
|
match: /\i(?=\?null)/,
|
||||||
replace: "false"
|
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…
Add table
Add a link
Reference in a new issue