Skip to content

Commit c495c06

Browse files
authored
Fetch app version from GitHub RAW
1 parent 8f1e4d4 commit c495c06

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

js/app.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,3 +1001,13 @@ function showUpdatePopup() {
10011001
}
10021002

10031003
if (navigator.onLine) checkForAppUpdate();
1004+
1005+
// Fatch app version from Github RAW
1006+
fetch("https://raw.githubusercontent.com/WorkofAditya/ChatBot/main/version.txt")
1007+
.then(response => response.text())
1008+
.then(data => {
1009+
document.getElementById("appVersion").textContent = data.trim();
1010+
})
1011+
.catch(() => {
1012+
document.getElementById("appVersion").textContent = "Unknown";
1013+
});

0 commit comments

Comments
 (0)