mirror of
https://github.com/NovaGM/Modules.git
synced 2024-08-14 22:47:01 +00:00
Compare commits
8 commits
d22e8ba1d8
...
c44edd8009
Author | SHA1 | Date | |
---|---|---|---|
c44edd8009 | |||
0ccac3ec8b | |||
0d49e7874d | |||
|
75e78f8538 | ||
|
0544402a65 | ||
|
8edca16f96 | ||
|
23a11ecd21 | ||
|
7959d4fe72 |
1 changed files with 27 additions and 1 deletions
|
@ -1,9 +1,15 @@
|
|||
import * as webpackModules from '@goosemod/webpack';
|
||||
import { createItem, removeItem } from '@goosemod/settings';
|
||||
import { version } from './goosemodModule.json';
|
||||
|
||||
var searchHook;
|
||||
var parseHook;
|
||||
var useEmojiSelectHandlerHook;
|
||||
|
||||
let settings = {
|
||||
emojisize: '64',
|
||||
};
|
||||
|
||||
const emojisModule = webpackModules.findByProps('getDisambiguatedEmojiContext', 'search');
|
||||
const messageEmojiParserModule = webpackModules.findByProps(
|
||||
'parse',
|
||||
|
@ -50,7 +56,7 @@ export default {
|
|||
for (let emoji of result.invalidEmojis) {
|
||||
result.content = result.content.replace(
|
||||
`<${emoji.animated ? 'a' : ''}:${emoji.originalName || emoji.name}:${emoji.id}>`,
|
||||
`${emoji.url}&size=64&width=16`,
|
||||
`${emoji.url}&size=${settings.emojisize}&width=16`,
|
||||
);
|
||||
}
|
||||
result.invalidEmojis = [];
|
||||
|
@ -68,12 +74,32 @@ export default {
|
|||
}
|
||||
};
|
||||
};
|
||||
|
||||
createItem('FreeNitro', [
|
||||
version,
|
||||
|
||||
{
|
||||
type: 'header',
|
||||
text: 'Change the emoji size to your liking!',
|
||||
},
|
||||
{
|
||||
type: 'text-input',
|
||||
text: 'Emoji Size',
|
||||
initialValue: () => settings.emojisize,
|
||||
oninput: (value) => {
|
||||
settings.emojisize = value;
|
||||
},
|
||||
},
|
||||
]);
|
||||
},
|
||||
|
||||
getSettings: () => [settings],
|
||||
|
||||
onRemove: async () => {
|
||||
searchHook = originalFunctions.original_search;
|
||||
parseHook = originalFunctions.original_parse;
|
||||
useEmojiSelectHandlerHook = originalFunctions.original_useEmojiSelectHandler;
|
||||
removeItem('FreeNitro');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue