mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-17 22:29:52 +08:00
refactor: using util function
This commit is contained in:
parent
922054faa2
commit
8105169e96
1 changed files with 2 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ import {
|
|||
canSetConfigWithCurrentFunboxes,
|
||||
canSetFunboxWithConfig,
|
||||
} from "./test/funbox/funbox-validation";
|
||||
import { reloadAfter } from "./utils/misc";
|
||||
|
||||
export let localStorageConfig: MonkeyTypes.Config;
|
||||
|
||||
|
|
@ -634,9 +635,7 @@ export function setAds(val: MonkeyTypes.Ads, nosave?: boolean): boolean {
|
|||
config.ads = val;
|
||||
saveToLocalStorage("ads", nosave);
|
||||
if (!nosave) {
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 3000);
|
||||
reloadAfter(3);
|
||||
Notifications.add("Ad settings changed. Refreshing...", 0);
|
||||
}
|
||||
ConfigEvent.dispatch("ads", config.ads);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue