1
0
Fork 0
mirror of https://github.com/NovaGM/Modules.git synced 2024-08-14 22:47:01 +00:00

Compare commits

..

8 commits

Author SHA1 Message Date
c44edd8009
Merge branch 'vbajs-master' 2021-06-08 23:16:04 +02:00
0ccac3ec8b
Merge branch 'master' of vbajs/Modulesr 2021-06-08 23:15:20 +02:00
0d49e7874d
Merge branch 'vbajs-master' 2021-06-08 23:09:11 +02:00
Yahya Wessam
75e78f8538
FreeNitro: onLoadingFinished is deprecated
Thus, create the settings in onImport instead
2021-06-08 23:08:23 +02:00
Yahya Wessam
0544402a65
FreeNitro: Make settings to freely change size
Note: width is unaffected

Add missing semicolon
How did I miss this? My bad :P
2021-06-08 23:07:57 +02:00
Yahya Wessam
8edca16f96 FreeNitro: onLoadingFinished is deprecated
Thus, create the settings in onImport instead
2021-06-08 23:23:13 +03:00
Yahya Wessam
23a11ecd21 Add missing semicolon
How did I miss this? My bad :P
2021-06-08 23:03:16 +03:00
Yahya Wessam
7959d4fe72 FreeNitro: Make settings to freely change size
Note: width is unaffected
2021-06-08 22:59:59 +03:00

View file

@ -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');
},
},
};