mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 18:07:02 -04:00
Add in client updater, Notices API
This commit is contained in:
parent
9aaa47ea4e
commit
8161a07dba
20 changed files with 525 additions and 48 deletions
24
src/plugins/apiNotices.ts
Normal file
24
src/plugins/apiNotices.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import definePlugin from "../utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "ApiNotices",
|
||||
description: "Fixes notices being automatically dismissed",
|
||||
author: "Vendicated",
|
||||
required: true,
|
||||
patches: [
|
||||
{
|
||||
find: "updateNotice:",
|
||||
replacement: [
|
||||
{
|
||||
match: /;(.{1,2}=null;)(?=.{0,50}updateNotice)/g,
|
||||
replace:
|
||||
';if(Vencord.Api.Notices.currentNotice)return !1;$1'
|
||||
},
|
||||
{
|
||||
match: /(?<=NOTICE_DISMISS:function.+?){(?=if\(null==(.+?)\))/,
|
||||
replace: '{if($1?.id=="VencordNotice")return ($1=null,Vencord.Api.Notices.nextNotice(),true);'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
});
|
|
@ -17,7 +17,7 @@ export default definePlugin({
|
|||
],
|
||||
|
||||
copyToClipBoard(color: string) {
|
||||
DiscordNative.clipboard.copy(color);
|
||||
window.DiscordNative.clipboard.copy(color);
|
||||
Toasts.show({
|
||||
message: "Copied to Clipboard!",
|
||||
type: Toasts.Type.SUCCESS,
|
||||
|
|
|
@ -16,7 +16,7 @@ for (const plugin of Object.values(Plugins)) if (plugin.patches && Settings.plug
|
|||
}
|
||||
}
|
||||
|
||||
export function startAll() {
|
||||
export function startAllPlugins() {
|
||||
for (const plugin in Plugins) if (Settings.plugins[plugin].enabled) {
|
||||
startPlugin(Plugins[plugin]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue