mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-26 22:58:21 -04:00
Remove FakeProfileThemesAndEffects
This commit is contained in:
parent
6a9a0b07c7
commit
7206502f4d
20 changed files with 94 additions and 1005 deletions
|
@ -59,20 +59,20 @@ export default definePlugin({
|
|||
// Discord adds it's paste listeners to #app-mount. We can intercept them
|
||||
// by attaching listeners a child element.
|
||||
containerEl = document.querySelector("[class^=appAsidePanelWrapper]")!;
|
||||
containerEl.addEventListener("paste", blockPastePropogation);
|
||||
containerEl?.addEventListener("paste", blockPastePropogation);
|
||||
|
||||
// Also add them to body to intercept the event listeners on document
|
||||
document.body.addEventListener("paste", blockPastePropogation);
|
||||
document?.body?.addEventListener("paste", blockPastePropogation);
|
||||
|
||||
document.body.addEventListener("mousedown", disablePasteOnMousedown);
|
||||
document?.body?.addEventListener("mousedown", disablePasteOnMousedown);
|
||||
},
|
||||
|
||||
stop() {
|
||||
containerEl.removeEventListener("paste", blockPastePropogation);
|
||||
containerEl?.removeEventListener("paste", blockPastePropogation);
|
||||
|
||||
document.body.removeEventListener("paste", blockPastePropogation);
|
||||
document?.body?.removeEventListener("paste", blockPastePropogation);
|
||||
|
||||
document.body.removeEventListener("mousedown", disablePasteOnMousedown);
|
||||
document?.body?.removeEventListener("mousedown", disablePasteOnMousedown);
|
||||
pasteDisabled = false;
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue