[Chore] Remove message easter eggs

pull/39/head
Oj18 3 years ago
parent 62ac43a9c4
commit 0e7873c13f

@ -8,6 +8,7 @@
- ### Tweaks [progress]
- Added new translators to GooseMod badges
- Changed settings from async waiting for i18n to awaiting i18n at start of load
- Removed message easter eggs
## v8.7.0 [2021-05-30]

@ -21,8 +21,6 @@ import { startLoadingScreen, stopLoadingScreen, updateLoadingScreen, setThisScop
import * as Settings from './ui/settings';
import easterEggs from './ui/easterEggs';
import { importModule, setThisScope as setThisScope3 } from './moduleManager';
// import { saveModuleSettings, clearModuleSetting, clearSettings, loadSavedModuleSetting, loadSavedModuleSettings, setThisScope as setThisScope4 } from './moduleSettingsStore';
import * as ModuleSettingsStore from './moduleSettingsStore';
@ -41,7 +39,6 @@ const scopeSetterFncs = [
setThisScope3,
moduleStoreAPI.setThisScope,
easterEggs.setThisScope,
Changelog.setThisScope,
GoosemodChangelog.setThisScope,
@ -72,7 +69,6 @@ const importsToAssign = {
moduleSettingsStore: ModuleSettingsStore,
webpackModules: WebpackModules,
messageEasterEggs: easterEggs,
logger: Logger,
showToast,
@ -199,8 +195,6 @@ const init = async function () {
this.cssCache.removeStyle();
this.messageEasterEggs.interval = setInterval(this.messageEasterEggs.check, 1000);
if (this.settings.gmSettings.get().gmBadges) this.gmBadges.addBadges();
if (this.settings.gmSettings.get().attrs) this.attrs.patch();
@ -212,7 +206,6 @@ const init = async function () {
this.remove = () => {
this.settingsUninjects.forEach((x) => x());
clearInterval(this.messageEasterEggs.interval);
clearInterval(this.saveInterval);
clearInterval(this.i18nCheckNewLangInterval);
clearInterval(this.hotupdateInterval);

@ -1,69 +0,0 @@
let goosemodScope = {};
export default {
setThisScope: (scope) => {
goosemodScope = scope;
},
eggs: [
{
text: 'Goose Emoji',
message: 'Did you know there is no goose emoji? The most used one as a standin is a swan (\u{1F9A2}). Very sad.'
},
{
text: 'That\'s Numberwang!',
message: 'That\'s Wangernum!'
},
{
text: 'When does Atmosphere come out?',
message: 'June 15th!'
},
{
text: 'What is the meaning of life?',
message: '42, duh.'
},
{
text: 'Honk',
message: 'Honk',
audio: 'https://cdn.discordapp.com/attachments/756146058924392542/784196129679343656/honk.mp3'
},
{
text: 'GooseMod',
message: 'You talking about me? ;)'
}
],
interval: 0,
check: () => {
let el = document.getElementsByClassName('slateTextArea-1Mkdgw')[0];
if (!el) return;
for (let e of goosemodScope.messageEasterEggs.eggs) {
if (el.textContent === e.text) {
if (e.cooldown) {
e.cooldown -= 1;
continue;
}
goosemodScope.showToast(e.message);
if (e.audio) {
const a = new Audio();
a.src = e.audio;
a.oncanplaythrough = () => {
a.play();
};
a.onended = () => {
a.remove();
};
}
e.cooldown = (e.cooldown || 6) - 1;
}
}
}
};
Loading…
Cancel
Save