1window.addEventListener('load', function () {
2
3    document.querySelectorAll('.edit-button-cs').forEach(editButtonFormElement => {
4
5        /**
6         * @type {HTMLElement}
7         */
8        let parent = null;
9        let classNameFunction = "edit-button-highlight-cs";
10        editButtonFormElement.addEventListener('mouseover', function (event) {
11            if (parent === null) {
12                parent = event.target.parentNode;
13            }
14            parent.classList.add(classNameFunction);
15        });
16        editButtonFormElement.addEventListener('mouseout', function () {
17            if (parent !== null) {
18                parent.classList.remove(classNameFunction);
19            }
20        });
21
22    });
23
24    // Disable the highlight function of dokuwiki pages.js
25    if (typeof dw_page !== 'undefined') {
26        dw_page.sectionHighlight = function () {
27        };
28    }
29
30});
31