Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to using cdn link directly in func replaceEmoji #88

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DiscordFreeEmojis.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function Start() {
}

function replaceEmoji(parseResult, emoji) {
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, emoji.url.split("?")[0] + "?size=48");
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, `https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? 'gif' : 'webp'}?size=48`);
}

parseHook = function() {
Expand Down
2 changes: 1 addition & 1 deletion DiscordFreeEmojis.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Init(final)
}

function replaceEmoji(parseResult, emoji) {
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, emoji.url.split("?")[0] + "?size=48");
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, `https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? 'gif' : 'webp'}?size=48`);
}

const original_parse = messageEmojiParserModule.parse;
Expand Down
2 changes: 1 addition & 1 deletion DiscordFreeEmojis64px.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function Start() {
}

function replaceEmoji(parseResult, emoji) {
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, emoji.url.split("?")[0] + "?size=64");
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, `https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? 'gif' : 'webp'}?size=64`);
}

parseHook = function() {
Expand Down
2 changes: 1 addition & 1 deletion DiscordFreeEmojis64px.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Init(final)
}

function replaceEmoji(parseResult, emoji) {
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, emoji.url.split("?")[0] + "?size=64");
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, `https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? 'gif' : 'webp'}?size=64`);
}

const original_parse = messageEmojiParserModule.parse;
Expand Down
2 changes: 1 addition & 1 deletion DiscordFreeEmojisSplit48px.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function Start() {
}

function replaceEmoji(parseResult, emoji) {
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, emoji.url.split("?")[0] + "?size=48");
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, `https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? 'gif' : 'webp'}?size=48`);
}

parseHook = function() {
Expand Down