WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcalexington/public_html/wp-content/plugins/wp-hummingbird/_src/js/global.js
( function() {
    'use strict';

    const WPHB_Global = {
    	menuButton: document.querySelector('#wp-admin-bar-wphb-clear-cache > a'),
    	noticeButton: document.getElementById('wp-admin-notice-wphb-clear-cache'),
        ajaxurl: null,

        init: function() {
            /** @var {array} wphbGlobal */
            if ( wphbGlobal ) {
                this.ajaxurl = wphbGlobal.ajaxurl;
            } else {
                this.ajaxurl = ajaxurl;
            }
    		if ( this.menuButton ) {
    			this.clearCache( this.menuButton, 'wphb_front_clear_cache' );
			}
    		if ( this.noticeButton ) {
    			this.clearCache( this.noticeButton, 'wphb_global_clear_cache' );
			}
		},

		clearCache: ( sender, action ) => {
            sender.addEventListener('click', () => {
                const xhr = new XMLHttpRequest();
                xhr.open('POST', WPHB_Global.ajaxurl+'?action='+action);
                xhr.onload = function() {
                    if (xhr.status === 200) {
                        location.reload();
                    }
                    else {
                        console.log( 'Request failed.  Returned status of ' + xhr.status );
                    }
                };
                xhr.send();
            });
		}
	};

    document.addEventListener("DOMContentLoaded", function(){
        WPHB_Global.init();
    } );
}());