aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/nitroBypass.ts
diff options
context:
space:
mode:
authorVen <vendicated@riseup.net>2022-10-06 00:42:58 +0200
committerGitHub <noreply@github.com>2022-10-06 00:42:58 +0200
commit74c3930e0a5ed264f330bc32c27116ead1063c5d (patch)
treea29ba43787c8cf8bbee648b5b478a8152086f965 /src/plugins/nitroBypass.ts
parente563521416052808bcec57057b921f0c0b6ca594 (diff)
downloadVencord-74c3930e0a5ed264f330bc32c27116ead1063c5d.tar.gz
Vencord-74c3930e0a5ed264f330bc32c27116ead1063c5d.tar.bz2
Vencord-74c3930e0a5ed264f330bc32c27116ead1063c5d.zip
add eslint config (#53)
* eslint * workflow * lint main
Diffstat (limited to 'src/plugins/nitroBypass.ts')
-rw-r--r--src/plugins/nitroBypass.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/nitroBypass.ts b/src/plugins/nitroBypass.ts
index d96ff0d..c5d69a4 100644
--- a/src/plugins/nitroBypass.ts
+++ b/src/plugins/nitroBypass.ts
@@ -1,8 +1,8 @@
-import { addPreSendListener, addPreEditListener, SendListener, removePreSendListener, removePreEditListener } from '../api/MessageEvents';
+import { addPreSendListener, addPreEditListener, removePreSendListener, removePreEditListener } from "../api/MessageEvents";
import { findByProps } from "../webpack";
import definePlugin from "../utils/types";
-import { Devs } from '../utils/constants';
-import { UserStore } from '../webpack/common';
+import { Devs } from "../utils/constants";
+import { UserStore } from "../webpack/common";
export default definePlugin({
name: "NitroBypass",
@@ -11,7 +11,7 @@ export default definePlugin({
dependencies: ["MessageEventsAPI"],
patches: [
{
- find: `canUseAnimatedEmojis:function`,
+ find: "canUseAnimatedEmojis:function",
replacement: [
"canUseAnimatedEmojis",
"canUseEmojisEverywhere",
@@ -58,8 +58,8 @@ export default definePlugin({
if (!emoji.require_colons) continue;
if (emoji.guildId === guildId && !emoji.animated) continue;
- const emojiString = `<${emoji.animated ? 'a' : ''}:${emoji.originalName || emoji.name}:${emoji.id}>`;
- const url = emoji.url.replace(/\?size=[0-9]+/, `?size=48`);
+ const emojiString = `<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`;
+ const url = emoji.url.replace(/\?size=[0-9]+/, "?size=48");
messageObj.content = messageObj.content.replace(emojiString, (match, offset, origStr) => {
return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`;
});
@@ -74,7 +74,7 @@ export default definePlugin({
if (emoji == null || (emoji.guildId === guildId && !emoji.animated)) continue;
if (!emoji.require_colons) continue;
- const url = emoji.url.replace(/\?size=[0-9]+/, `?size=48`);
+ const url = emoji.url.replace(/\?size=[0-9]+/, "?size=48");
messageObj.content = messageObj.content.replace(emojiStr, (match, offset, origStr) => {
return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`;
});