HEX
Server: Apache
System: Linux server-674799.igrow.ws 5.14.0-611.27.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 4 04:40:11 EST 2026 x86_64
User: elrashedytravel (1025)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/elrashedytravel/public_html/wp-content/themes/morenews/assets/toggle-script.js
(function (e) {
    "use strict";
    var n = window.AFTHRAMPES_JS || {};
    n.lightDarkToggle = function () {
        jQuery('#aft-dark-light-mode-btn').on('click', function (event) {
            event.preventDefault();
            var DefaultSiteModeAttr = e(this).data('site-mode');
            var DefaultSiteModeCls = e(this).attr('class');
            if (DefaultSiteModeAttr === DefaultSiteModeCls) {
                n.lightDarkToggleFunction(DefaultSiteModeAttr);
            } else {
                n.lightDarkToggleFunction(DefaultSiteModeCls);

            }
        });
    },

        n.lightDarkToggleFunction = function (DefaultSiteModeAttr) {
            jQuery.removeCookie('morenews-stored-site-mode', { expires: 7, path: '/' });            
            var actualSiteModeAttr = e('#aft-dark-light-mode-btn').data('site-mode');            
            var switchSiteModeAttr = '';
            if (DefaultSiteModeAttr === 'aft-dark-mode') {
                switchSiteModeAttr = 'aft-default-mode';
            } else {
                switchSiteModeAttr = 'aft-dark-mode';
            }
            e('body').removeClass(DefaultSiteModeAttr);
            e('body').addClass(switchSiteModeAttr);
            e('#aft-dark-light-mode-btn').removeClass(DefaultSiteModeAttr);
            e('#aft-dark-light-mode-btn').addClass(switchSiteModeAttr);
            jQuery.cookie('morenews-stored-site-mode', switchSiteModeAttr, { expires: 7, path: '/' });
           

        },

        e(document).ready(function () {
            n.lightDarkToggle();

        });

})(jQuery);