HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/locationdebateau/wp-content/plugins/betterdocs/admin/assets/js/promotion.js
jQuery(window).on("elementor/frontend/init", function () {
    // init edit mode hook
    if (elementorFrontend.isEditMode()) {
        if (typeof parent.document==="undefined"){
            return false;
        }
        parent.document.addEventListener("mousedown", function (e) {
            var widgets = parent.document.querySelectorAll(".elementor-element--promotion");

            if (widgets.length > 0) {
                for (var i = 0; i < widgets.length; i++) {
                    if (widgets[i].contains(e.target)) {
                        var dialog = parent.document.querySelector("#elementor-element--promotion__dialog");
                        var icon = widgets[i].querySelector(".icon > i");

                        if (icon.classList.toString().indexOf("eaicon") >= 0) {
                            dialog.querySelector(".dialog-buttons-action").style.display = "none";
                            e.stopImmediatePropagation();
                            if (dialog.querySelector(".ea-dialog-buttons-action") === null) {
                                var button = document.createElement("a");
                                var buttonText = document.createTextNode("Upgrade Essential Addons");

                                button.setAttribute("href", "https://betterdocs.co/upgrade");
                                button.setAttribute("target", "_blank");
                                button.classList.add(
                                    "dialog-button",
                                    "dialog-action",
                                    "dialog-buttons-action",
                                    "elementor-button",
                                    "elementor-button-success",
                                    "ea-dialog-buttons-action"
                                );
                                button.appendChild(buttonText);

                                dialog.querySelector(".dialog-buttons-action").insertAdjacentHTML("afterend", button.outerHTML);
                            } else {
                                dialog.querySelector(".ea-dialog-buttons-action").style.display = "";
                            }
                        } else {
                            dialog.querySelector(".dialog-buttons-action").style.display = "";

                            if (dialog.querySelector(".ea-dialog-buttons-action") !== null) {
                                dialog.querySelector(".ea-dialog-buttons-action").style.display = "none";
                            }
                        }

                        // stop loop
                        break;
                    }
                }
            }
        });
    }
});