mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-11 01:15:49 +08:00
Update banner refresh (#3677) robsassack
* Added refresh on click to update banner * Minimized added CSS
This commit is contained in:
parent
5ae51b36ff
commit
f1ad57ab3b
1 changed files with 9 additions and 0 deletions
|
@ -178,6 +178,15 @@ class Notification {
|
|||
}
|
||||
);
|
||||
}
|
||||
// NOTE: This need to be changed if the update banner text is changed
|
||||
if (this.message.includes("please refresh")) {
|
||||
// add pointer when refresh is needed
|
||||
$(`#bannerCenter .banner[id='${this.id}']`).css("cursor", "pointer");
|
||||
// refresh on clicking banner
|
||||
$(`#bannerCenter .banner[id='${this.id}']`).on("click", () => {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
if (this.duration > 0) {
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in a new issue