Optimise Web via treeshaking, cleanup build scripts
This commit is contained in:
parent
845088ec02
commit
01ae0983b3
14 changed files with 261 additions and 269 deletions
|
|
@ -18,7 +18,16 @@ export default definePlugin({
|
|||
],
|
||||
|
||||
copyToClipBoard(color: string) {
|
||||
window.DiscordNative.clipboard.copy(color);
|
||||
if (IS_WEB) {
|
||||
navigator.clipboard.writeText(color)
|
||||
.then(() => this.notifySuccess);
|
||||
} else {
|
||||
DiscordNative.clipboard.copy(color);
|
||||
this.notifySuccess();
|
||||
}
|
||||
},
|
||||
|
||||
notifySuccess() {
|
||||
Toasts.show({
|
||||
message: "Copied to Clipboard!",
|
||||
type: Toasts.Type.SUCCESS,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export default definePlugin({
|
|||
name: "No RPC",
|
||||
description: "Disables Discord's RPC server.",
|
||||
authors: [Devs.Cyn],
|
||||
target: "DESKTOP",
|
||||
patches: [
|
||||
{
|
||||
find: '.ensureModule("discord_rpc")',
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export default definePlugin({
|
|||
name: "NoSystemBadge",
|
||||
description: "Disables the taskbar and system tray unread count badge.",
|
||||
authors: [Devs.rushii],
|
||||
target: "DESKTOP",
|
||||
patches: [
|
||||
{
|
||||
find: "setSystemTrayApplications:function",
|
||||
|
|
|
|||
|
|
@ -28,12 +28,15 @@ export default definePlugin({
|
|||
find: "Messages.ACTIVITY_SETTINGS",
|
||||
replacement: {
|
||||
match: /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/,
|
||||
replace: (m, mod) =>
|
||||
`{section:${mod}.ID.HEADER,label:"Vencord"},` +
|
||||
'{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' +
|
||||
'{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater,predicate:()=>!IS_WEB},' +
|
||||
`{section:${mod}.ID.DIVIDER},${m}`
|
||||
|
||||
replace: (m, mod) => {
|
||||
const updater = !IS_WEB ? '{section:"VencordUpdater",label:"Updater",element:Vencord.Components.Updater},' : "";
|
||||
return (
|
||||
`{section:${mod}.ID.HEADER,label:"Vencord"},` +
|
||||
'{section:"VencordSetting",label:"Vencord",element:Vencord.Components.Settings},' +
|
||||
updater +
|
||||
`{section:${mod}.ID.DIVIDER},${m}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue