Update Image Viewer.html

Now working on viewer folder
pull/41/head
heloess 2024-06-20 18:03:48 +03:00 committed by GitHub
parent f1d6fd7325
commit fd8799a5b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@
</head>
<body>
<div id="imageContainer">
<img id="currentImage" src="viewer/saved.png" alt="Current Image">// Set your path.
<img id="currentImage" src="saved.png" alt="Current Image">// Set your path.
</div>
<script>
var imgElement = document.getElementById('currentImage');
@ -140,7 +140,7 @@
function refreshImage() {
var previousSrc = imgElement.src;
imgElement.src = "viewer/saved.png" + "?" + new Date().getTime(); // Set your path
imgElement.src = "saved.png" + "?" + new Date().getTime(); // Set your path
// Check if the new src is equal to the previous one (which means the image wasn't found)
imgElement.onload = function() {