add tux js
Linux detection inside the splash
This commit is contained in:
parent
4d82a6f41d
commit
391f474761
1 changed files with 15 additions and 6 deletions
|
@ -32,12 +32,21 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<img
|
<img id="platformImage" draggable="false" src="../shiggy.gif" alt="shiggy" role="presentation" />
|
||||||
draggable="false"
|
|
||||||
src="../shiggy.gif"
|
|
||||||
alt="shiggy"
|
|
||||||
role="presentation"
|
|
||||||
/>
|
|
||||||
<p>Loading Vesktop...</p>
|
<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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
Reference in a new issue