Use readystatechange for active links
This commit is contained in:
2
js/ui.js
2
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 => {
|
||||
|
||||
Reference in New Issue
Block a user