• Resolved zroku

    (@zroku)


    Hi, I installed the plugin and tried it out. It seems like the custom javascript I have for translation some how conflicts with the plugin.

    This is the custom javascript code I used:
    document.body.innerHTML = document.body.innerHTML.replace(/XXX/g, ‘YYY’);

    The dashboard tabs and other clickable link aren’t responding. Only works when I removed all the custom javascript.

    Please advise. Thanks

    Philip

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter zroku

    (@zroku)

    Other pages also have issues. Like on the single listing page, the footer thumbnail isn’t working what it’s supposed to be.

    • This reply was modified 3 years, 8 months ago by zroku.
    Thread Starter zroku

    (@zroku)

    I found a fixed by changing the custom javascript to:

    function replace(element, from, to) {
        if (element.childNodes.length) {
            element.childNodes.forEach(child => replace(child, from, to));
        } else {
            const cont = element.textContent;
            if (cont) element.textContent = cont.replace(from, to);
        }
    };
    
    replace(document.body, new RegExp("hello", "g"), "hi");

    It all works now. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dashboard not functioning’ is closed to new replies.