mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-03 20:40:48 +08:00
parent
82e8edbc2f
commit
b2609bb084
2 changed files with 7 additions and 7 deletions
|
@ -1,7 +1,6 @@
|
|||
import * as DB from "./db";
|
||||
import * as Sound from "./controllers/sound-controller";
|
||||
import * as OutOfFocus from "./test/out-of-focus";
|
||||
import * as LiveBurst from "./test/live-burst";
|
||||
import * as Funbox from "./test/funbox";
|
||||
import * as Notifications from "./elements/notifications";
|
||||
import * as ThemeController from "./controllers/theme-controller";
|
||||
|
@ -705,11 +704,6 @@ export function setShowLiveBurst(live, nosave) {
|
|||
live = false;
|
||||
}
|
||||
config.showLiveBurst = live;
|
||||
if (live) {
|
||||
LiveBurst.show();
|
||||
} else {
|
||||
LiveBurst.hide();
|
||||
}
|
||||
if (!nosave) saveToLocalStorage();
|
||||
dispatchEvent("showLiveBurst", config.showLiveBurst);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Config from "../config";
|
||||
import Config, * as UpdateConfig from "../config";
|
||||
import * as TestLogic from "./test-logic";
|
||||
|
||||
export function update(burst) {
|
||||
|
@ -55,3 +55,9 @@ export function hide() {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
UpdateConfig.subscribeToEvent((eventKey, eventValue) => {
|
||||
if (eventKey === "showLiveBurst") eventValue ? show() : hide();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue