mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-04 15:00:14 +01:00
other JS changes
This commit is contained in:
parent
e8de5739fa
commit
74f6cd63f4
@ -140,8 +140,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
setMode("off")
|
||||
}
|
||||
|
||||
document.getElementById("dark-mode-toggle").addEventListener("click", function (event) {
|
||||
event.preventDefault()
|
||||
toggleDarkMode()
|
||||
})
|
||||
var darkModeToggle = document.getElementById("dark-mode-toggle");
|
||||
if (darkModeToggle !== null) {
|
||||
darkModeToggle.addEventListener("click", function (event) {
|
||||
event.preventDefault();
|
||||
toggleDarkMode();
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -31,7 +31,11 @@ async function getLatestReleaseVersion() {
|
||||
|
||||
async function checkForUpdate() {
|
||||
// Initialize the update button as hidden
|
||||
document.getElementById("update-btn").style.display = "none";
|
||||
var updateBtn = document.getElementById("update-btn");
|
||||
if (updateBtn !== null) {
|
||||
updateBtn.style.display = "none";
|
||||
}
|
||||
|
||||
|
||||
const latestVersion = await getLatestReleaseVersion();
|
||||
console.log("latestVersion=" + latestVersion)
|
||||
@ -45,4 +49,7 @@ async function checkForUpdate() {
|
||||
}
|
||||
}
|
||||
|
||||
checkForUpdate();
|
||||
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
checkForUpdate();
|
||||
});
|
Loading…
Reference in New Issue
Block a user