Forum Discussion
Javascript problem due to the update ?
let btnNext = document.querySelector(".slide-control-button-next");
if (!btnNext.hasAttribute("onmouseup")) {
btnNext.setAttribute("onmouseup", "window.parent.ChildNav('Next');");
}
let btnPrev = document.querySelector(".slide-control-button-previous");
if (!btnPrev.hasAttribute("onmouseup")) {
btnPrev.setAttribute("onmouseup", "window.parent.ChildNav('Previous');");
}
let topicLinks = [...document.querySelectorAll(".item-collapsible li:nth-child(1) .cs-listitem")];
let slideLinks = document.querySelectorAll(".cs-listitem");
if (!slideLinks[0].hasAttribute("onmouseup")) {
let slideCount = 0;
let titlesArr = [];
[...slideLinks].forEach(slideLink => {
if (topicLinks.indexOf(slideLink) === -1) {
titlesArr.push(slideLink.getAttribute("title"));
slideLink.setAttribute("onmouseup", "window.parent.ChildNav(" + slideCount + ");");
slideCount++;
} else if (slideCount !== 0) {
slideLink.setAttribute("onmouseup", "window.parent.ChildNav(" + (slideCount + 1) + ");");
} else {
slideLink.setAttribute("onmouseup", "window.parent.ChildNav(" + slideCount + ");");
}
});
window.parent.SetTitlesArr(titlesArr);
window.parent.SetSlideCount(slideCount);
window.parent.CreateInstructWindow();
}