diff --git a/about.html b/about.html index 78e35d8..afed323 100644 --- a/about.html +++ b/about.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/about_us.html b/about_us.html index e802f93..aa36e9b 100644 --- a/about_us.html +++ b/about_us.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/content.html b/content.html index b0f1bc6..8495cb7 100644 --- a/content.html +++ b/content.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/credits.html b/credits.html index 5fdd5f0..c3968e1 100644 --- a/credits.html +++ b/credits.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/gallery.html b/gallery.html index 3d9bd7d..ea5316d 100644 --- a/gallery.html +++ b/gallery.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/licensing.html b/licensing.html index 06a2fa6..c38c2ea 100644 --- a/licensing.html +++ b/licensing.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/playguide.html b/playguide.html index 8339f1e..b24369f 100644 --- a/playguide.html +++ b/playguide.html @@ -67,7 +67,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/releases.html b/releases.html index d4b22fd..51a243d 100644 --- a/releases.html +++ b/releases.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent; diff --git a/videos.html b/videos.html index 528359c..50e9844 100644 --- a/videos.html +++ b/videos.html @@ -61,7 +61,8 @@ var last="" var objDiv=document.getElementById("toc") function scroll() { - var elem=document.getElementsByClassName("nav-link active")[0] + var elem=document.getElementsByClassName("nav-link active") + elem=elem[elem.length-1] console.log(elem.textContent) if (elem != null && last != elem.textContent) { last=elem.textContent;