mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-07 09:13:58 -05:00
Properly Restrict
This commit is contained in:
parent
e2ca547b2e
commit
5a01fde437
2 changed files with 19 additions and 41 deletions
|
@ -19,19 +19,12 @@
|
||||||
import { EquicordDevs } from "@utils/constants";
|
import { EquicordDevs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { findAll } from "@webpack";
|
import { findAll } from "@webpack";
|
||||||
import { Forms } from "@webpack/common";
|
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "DisableAnimations",
|
name: "DisableAnimations",
|
||||||
description: "Disables most of Discord's animations.",
|
description: "Disables most of Discord's animations.",
|
||||||
authors: [EquicordDevs.seth],
|
authors: [EquicordDevs.seth],
|
||||||
settingsAboutComponent: () => <>
|
|
||||||
<Forms.FormText className="platform-warning">
|
|
||||||
This plugin will only work on Equibop Vesktop and Discord Desktop
|
|
||||||
</Forms.FormText>
|
|
||||||
</>,
|
|
||||||
start() {
|
start() {
|
||||||
if (IS_EQUIBOP || IS_VESKTOP || IS_DISCORD_DESKTOP) {
|
|
||||||
this.springs = findAll(mod => {
|
this.springs = findAll(mod => {
|
||||||
if (!mod.Globals) return false;
|
if (!mod.Globals) return false;
|
||||||
return true;
|
return true;
|
||||||
|
@ -47,10 +40,8 @@ export default definePlugin({
|
||||||
this.css.innerText = "* { transition: none !important; animation: none !important; }";
|
this.css.innerText = "* { transition: none !important; animation: none !important; }";
|
||||||
|
|
||||||
document.head.appendChild(this.css);
|
document.head.appendChild(this.css);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
if (IS_EQUIBOP || IS_VESKTOP || IS_DISCORD_DESKTOP) {
|
|
||||||
for (const spring of this.springs) {
|
for (const spring of this.springs) {
|
||||||
spring.Globals.assign({
|
spring.Globals.assign({
|
||||||
skipAnimation: false,
|
skipAnimation: false,
|
||||||
|
@ -59,5 +50,4 @@ export default definePlugin({
|
||||||
|
|
||||||
if (this.css) this.css.remove();
|
if (this.css) this.css.remove();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
|
@ -1,12 +0,0 @@
|
||||||
.platform-warning {
|
|
||||||
font-size: 16px !important;
|
|
||||||
background-color: rgb(240 71 71 / 10%);
|
|
||||||
color: rgb(240 71 71) !important;
|
|
||||||
border: 1px solid rgb(240 71 71 / 60%) !important;
|
|
||||||
border-radius: 5px !important;
|
|
||||||
font-weight: 500;
|
|
||||||
padding: 6px 10px;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 10px;
|
|
||||||
font-style: bold;
|
|
||||||
}
|
|
Loading…
Reference in a new issue