mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-07 15:15:49 +08:00
refreshing after enabling ads automatically
This commit is contained in:
parent
e7fcab63a4
commit
71396def84
2 changed files with 9 additions and 3 deletions
|
@ -2744,7 +2744,10 @@
|
|||
<h1>enable ads</h1>
|
||||
<div class="text">
|
||||
If you wish to support me without directly donating you can
|
||||
enable ads that will be visible at the bottom of the screen
|
||||
enable ads that will be visible at the bottom of the screen.
|
||||
Sellout mode also shows ads on both sides of the screen.
|
||||
<br />
|
||||
<br />
|
||||
(changes will take effect after a refresh).
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
|
|
@ -96,7 +96,7 @@ async function saveConfigToCookie(noDbCheck = false) {
|
|||
path: "/",
|
||||
});
|
||||
restartCount = 0;
|
||||
if (!noDbCheck) saveConfigToDB();
|
||||
if (!noDbCheck) await saveConfigToDB();
|
||||
}
|
||||
|
||||
async function saveConfigToDB() {
|
||||
|
@ -638,7 +638,10 @@ function setEnableAds(val, nosave) {
|
|||
val = "off";
|
||||
}
|
||||
config.enableAds = val;
|
||||
if (!nosave) saveConfigToCookie();
|
||||
if (!nosave)
|
||||
saveConfigToCookie().then(() => {
|
||||
setTimeout(location.reload(), 500);
|
||||
});
|
||||
}
|
||||
|
||||
//flip colors
|
||||
|
|
Loading…
Add table
Reference in a new issue