Use readystatechange for active links

This commit is contained in:
2021-09-02 12:32:29 +02:00
parent c9127e3384
commit 6f945e72f3
2 changed files with 2 additions and 2 deletions

View File

@@ -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 => {