HEX
Server: Apache/2.4.54 (Unix) OpenSSL/1.0.2k-fips
System: Linux f17.eelserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
User: zulfiqar (1155)
PHP: 8.2.0
Disabled: mail, exec, system, popen, proc_open, shell_exec, passthru, show_source
Upload Files
File: /home/zulfiqar/public_html/wp-content/plugins/wp-nonstop-smushit/assets/js/main.js
;(function(window) {
    'use strict';
    if (!window.MutationObserver) {
        return;
    }

    var observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            if (mutation.type !== 'attributes' || mutation.attributeName !== 'class') {
                return;
            }

            var exceeded = mutation.target.classList.contains('wp-smush-exceed-limit');
            if (exceeded) {
                const button = mutation.target.querySelector('.wp-smush-resume-bulk-smush') ?? mutation.target.querySelector('.wp-smush-all');
                
                if (button) {
                    button.click();
                }
            }
        });
    });

    const container = document.querySelector('.wp-smush-bulk-progress-bar-wrapper');
    if (container) {
        observer.observe(container, {attributes: true});
    }
})(window);