add tux js

Linux detection inside the splash
This commit is contained in:
Urufusan 2024-01-25 15:58:51 +01:00 committed by GitHub
parent 4d82a6f41d
commit 391f474761
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,12 +32,21 @@
<body>
<div class="wrapper">
<img
draggable="false"
src="../shiggy.gif"
alt="shiggy"
role="presentation"
/>
<img id="platformImage" draggable="false" src="../shiggy.gif" alt="shiggy" role="presentation" />
<p>Loading Vesktop...</p>
<script>
document.addEventListener("DOMContentLoaded", function() {
var platform = navigator.platform.toLowerCase();
var imageSource = (platform.includes("linux")) ? "../tux.gif" : "../shiggy.gif";
// Update the src attribute of the existing img tag
var imageElement = document.getElementById("platformImage");
if (imageElement) {
imageElement.src = imageSource;
} else {
console.error("Image element not found");
}
});
</script>
</div>
</body>