This commit is contained in:
thororen1234 2024-06-21 20:32:10 -04:00
commit a001e74ea5
7 changed files with 3094 additions and 1867 deletions

View file

@ -51,7 +51,7 @@
"axios": "^1.6.8", "axios": "^1.6.8",
"fflate": "^0.7.4", "fflate": "^0.7.4",
"gifenc": "github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3", "gifenc": "github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3",
"monaco-editor": "^0.43.0", "monaco-editor": "^0.50.0",
"nanoid": "^4.0.2", "nanoid": "^4.0.2",
"usercss-meta": "^0.12.0", "usercss-meta": "^0.12.0",
"virtual-merge": "^1.0.1" "virtual-merge": "^1.0.1"

File diff suppressed because it is too large Load diff

View file

@ -255,7 +255,7 @@ export default definePlugin({
}, },
{ {
// Show all activities in the profile panel // Show all activities in the profile panel
find: /\i\.\i\i\.PANEL,themeOverride:\i\i,/, find: /\i\.\i\i\.PANEL,themeOverride:.{1,5}children:/,
replacement: { replacement: {
match: /(?<=\(0,\i\.jsx\)\()\i\.\i(?=,{activity:.+?,user:\i,channelId:\i.id,)/, match: /(?<=\(0,\i\.jsx\)\()\i\.\i(?=,{activity:.+?,user:\i,channelId:\i.id,)/,
replace: "$self.showAllActivitiesComponent" replace: "$self.showAllActivitiesComponent"

View file

@ -4,10 +4,6 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Equicord QuickCSS Editor</title> <title>Equicord QuickCSS Editor</title>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.40.0/min/vs/editor/editor.main.min.css"
integrity="sha512-MOoQ02h80hklccfLrXFYkCzG+WVjORflOp9Zp8dltiaRP+35LYnO4LKOklR64oMGfGgJDLO8WJpkM1o5gZXYZQ=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<style> <style>
html, html,
body, body,
@ -26,36 +22,17 @@
<body> <body>
<div id="container"></div> <div id="container"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.40.0/min/vs/loader.min.js"
integrity="sha512-QzMpXeCPciAHP4wbYlV2PYgrQcaEkDQUjzkPU4xnjyVSD9T36/udamxtNBqb4qK4/bMQMPZ8ayrBe9hrGdBFjQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script> <script>
require.config({ const script = document.createElement("script");
paths: { script.src = new URL("/dist/monaco/index.js", baseUrl);
vs: "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.40.0/min/vs",
},
});
require(["vs/editor/editor.main"], () => { const style = document.createElement("link");
getCurrentCss().then((css) => { style.type = "text/css";
var editor = monaco.editor.create( style.rel = "stylesheet";
document.getElementById("container"), style.href = new URL("/dist/monaco/index.css", baseUrl);
{
value: css, document.body.append(style, script);
language: "css",
theme: getTheme(),
}
);
editor.onDidChangeModelContent(() =>
setCss(editor.getValue())
);
window.addEventListener("resize", () => {
// make monaco re-layout
editor.layout();
});
});
});
</script> </script>
</body> </body>

View file

@ -141,7 +141,7 @@ export default definePlugin({
required: true, required: true,
description: "Helps us provide support to you", description: "Helps us provide support to you",
authors: [Devs.Ven, EquicordDevs.thororen], authors: [Devs.Ven, EquicordDevs.thororen],
dependencies: ["CommandsAPI", "UserSettingsAPI"], dependencies: ["CommandsAPI", "UserSettingsAPI", "MessageAccessoriesAPI"],
patches: [{ patches: [{
find: ".BEGINNING_DM.format", find: ".BEGINNING_DM.format",

View file

@ -63,21 +63,7 @@ export default definePlugin({
match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/, match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,
replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs({user: $1, onClose: $2});" replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs({user: $1, onClose: $2});"
} }
}, }
{
find: /Messages\.USER_PROFILE_MUTUAL_GUILDS_PLACEHOLDER\)\.with\(0,\(\)=>\i\.\i\.Messages\.USER_PROFILE_NO_MUTUAL_SERVERS/,
group: true,
replacement: [
{
match: /(user:(\i),.+?=\i,)(.+?)(\i\.push)(.+?\i\.MUTUAL_GUILDS,text:.{0,250}}\)\)}\))/,
replace: '$1vencordMutualGroupsTabLabel=$self.useGDMCount($2.id),$3$5,$4({section:"MUTUAL_GDMS",text:vencordMutualGroupsTabLabel})'
},
{
match: /(?<=(\i)===\i\.\i\i\.MUTUAL_GUILDS?.{0,150}\}\):)/,
replace: '$1==="MUTUAL_GDMS"?$self.renderMutualGDMs(arguments[0]):'
},
]
},
], ],
useGDMCount(userId: string) { useGDMCount(userId: string) {

View file

@ -48,10 +48,10 @@ export default definePlugin({
}, },
patches: [ patches: [
{ {
find: "showTaglessAccountPanel:", find: '"AccountConnected"',
replacement: { replacement: {
// react.jsx)(AccountPanel, { ..., showTaglessAccountPanel: blah }) // react.jsx)(AccountPanel, { ..., showTaglessAccountPanel: blah })
match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?showTaglessAccountPanel:)/, match: /(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,hidePrivateData:)/,
// react.jsx(WrapperComponent, { VencordOriginal: AccountPanel, ... // react.jsx(WrapperComponent, { VencordOriginal: AccountPanel, ...
replace: "$self.PanelWrapper,{VencordOriginal:$1," replace: "$self.PanelWrapper,{VencordOriginal:$1,"
} }