CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
ProdigyPNP

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: ProdigyPNP/ProdigyMathGameHacking
Path: blob/master/cheatGUI/src/utils/status.ts
Views: 723
1
import { Swal } from "../utils/swal"; // Import Swal
2
3
/*
4
export async function statusMessage () {
5
6
7
const UpdateToMv3 = Swal.mixin({
8
title: "PHEx 3.0.0",
9
icon: "info",
10
showCancelButton: true,
11
showConfirmButton: true,
12
confirmButtonText: "Update to 3.0.0",
13
cancelButtonText: "I've already updated.",
14
html: "<p>WE DID IT!! PHEx 3.0.0 IS NOW RELESED!!!</p> </p>We've released a new version of PHEx! We strongly reccomend updating to PHEx 3.0.0.</p><p><a href=https://github.com/ProdigyPNP/ProdigyMathGameHacking/releases/latest>Update now!</a></p>"
15
16
});
17
18
if (await (await UpdateToMv3.fire()).value) {
19
window.location.href = "https://github.com/ProdigyPNP/ProdigyMathGameHacking/releases/latest";
20
};
21
22
}
23
*/
24
25
26
27
28
29
export function statusMessage () {
30
31
32
fetch(`https://raw.githubusercontent.com/ProdigyPNP/ProdigyMathGameHacking/master/cheatGUI/statusmessage.json?updated=${Date.now()}`).then(response => response.json()).then(async data => {
33
34
const enabled = data.enabled;
35
36
if (enabled.value === false) {
37
return console.log("Status message is disabled.");
38
} else {
39
40
await Swal.fire({
41
title: data.get("title"),
42
html: data.get("html"),
43
icon: data.get("icon"),
44
});
45
46
}
47
48
});
49
50
51
52
};
53
54