Selaa lähdekoodia

Fix "go back in history" button in doc

Han Lin Yap 13 vuotta sitten
vanhempi
commit
c4be7d788b
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      docs/index.html

+ 7 - 1
docs/index.html

@@ -392,7 +392,13 @@
 
 			}
 
-			goTo( window.location.hash.substring(1) );
+			function goToHash() {
+				goTo( window.location.hash.substring(1) );
+			}
+			
+			window.addEventListener( 'hashchange', goToHash, false );
+
+			goToHash();
 
 			// Layout