We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try to allow the background img to change every 3 min but fail
case "bgImage": const imagePaths = getImagePathsFromDirectory('images\\'); let currentImageIndex = 0; document.body.style.backgroundImage = `url('${imagePaths[currentImageIndex].replace(/\\/g, "/")}')`; setInterval(function() { currentImageIndex = (currentImageIndex + 1) % imagePaths.length; document.body.style.backgroundImage = `url('${imagePaths[currentImageIndex].replace(/\\/g, "/")}}')`; }, 3 * 60 * 1000); break` function getImagePathsFromDirectory(directoryPath) { const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif']; const imagePaths = []; const directoryReader = new FileReader(); directoryReader.readAsArrayBuffer(new Blob([directoryPath], { type: "text/plain" })); directoryReader.onloadend = function() { const entries = directoryReader.result; for (let i = 0; i < entries.length; i++) { const entry = entries[i]; const fileExtension = entry.name.split('.').pop().toLowerCase(); if (imageExtensions.includes('.' + fileExtension)) { imagePaths.push(entry.fullPath); } } }; return imagePaths; }
pls send feed back on my errors so i can improve
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try to allow the background img to change every 3 min but fail
pls send feed back on my errors so i can improve
The text was updated successfully, but these errors were encountered: