Home
Il progetto
L'itinerario
diff --git a/js/ui.js b/js/ui.js
index 56fc366..173f80c 100644
--- a/js/ui.js
+++ b/js/ui.js
@@ -39,7 +39,7 @@ if (homeRE.test(window.location.href)) {
* Apply active class to selected link...
* @todo Inefficient!!
*/
-window.addEventListener('focus', () => {
+document.addEventListener('readystatechange', () => {
let navlinks = Array.from(document.querySelectorAll('#links a'));
navlinks.forEach(element => {