mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	make the progress bar disappear near the bottom
This commit is contained in:
		| @@ -116,8 +116,9 @@ function progressBar() { | ||||
|     var bar = document.getElementById("progressBar"); | ||||
|  | ||||
|     document.addEventListener('scroll', () => { | ||||
|         var scrollPercent = document.documentElement.scrollTop / (document.documentElement.scrollHeight - window.innerHeight) * 100 + '%'; | ||||
|         bar.style.setProperty("--scrollAmount", scrollPercent); | ||||
|         var scrollPercent = document.documentElement.scrollTop / (document.documentElement.scrollHeight - window.innerHeight) * 100; | ||||
|         if (scrollPercent >= 99) { scrollPercent = 0 }; | ||||
|         bar.style.setProperty("--scrollAmount", scrollPercent + '%'); | ||||
|     }) | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Wonderfall
					Wonderfall