403Webshell
Server IP : 60.247.133.247  /  Your IP : 216.73.217.108
Web Server : Apache
System : Linux ebs-119054 5.10.0-14-amd64 #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64
User : goodwill ( 65985)
PHP Version : 8.2.20
Disable Function : link,symlink,passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server,pcntl_fork,pcntl_rfork
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wwwroot/goodwill/wwwroot/wp-content/themes/GoodWill/js/compatibility/elementor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wwwroot/goodwill/wwwroot/wp-content/themes/GoodWill/js/compatibility/elementor/the7-banner.js
jQuery(function ($) {
    $(window).on("elementor/frontend/init", function () {
        class BannerWidget {
            constructor($widget) {
                this.$widget = $widget;
                this.widgetId = $widget.data("id");
                this.settings = new The7ElementorSettings($widget);
                const isPreview = elementorFrontend.isEditMode() || elementorFrontend.isWPPreviewMode();
                // Do not hide banner in preview mode or if close_banner_for_session is disabled
                this.rememeberBeingClosed = !isPreview && this.settings.getSettings("close_banner_for_session");
            }

            getClosed() {
                let storedValue = the7Cookies.get("the7_closed_banner_widgets");
                if (storedValue) {
                    return JSON.parse(storedValue);
                }

                return [];
            }

            isClosed() {
                if (this.rememeberBeingClosed) {
                    return this.getClosed().includes(this.widgetId);
                }

                return false;
            }

            setClosed() {
                if (!this.rememeberBeingClosed) {
                    return;
                }
                let closedBanners = this.getClosed();
                if (!closedBanners.includes(this.widgetId)) {
                    closedBanners.push(this.widgetId);
                    the7Cookies.set("the7_closed_banner_widgets", JSON.stringify(closedBanners), false, "/");
                }
            }
        }

        elementorFrontend.hooks.addAction("frontend/element_ready/the7-banner.default", function ($widget, $) {
            const bannerWidget = new BannerWidget($widget);

            if (bannerWidget.isClosed()) {
                $widget.hide().remove();
            } else {
                $widget.removeClass("hidden");
            }

            $widget.find(".close-button-container .close-button").on("click", function () {
                bannerWidget.setClosed();
                $widget.css("opacity", "0").stop(true, true).slideUp(250, () => {
                    $widget.remove();
                    window.scrollTo(0, window.scrollY + 1);
                    window.scrollTo(0, window.scrollY - 1);
                });
            });
        });
    });
});

Youez - 2016 - github.com/yon3zu
LinuXploit