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/plugins/gutena-forms/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wwwroot/goodwill/wwwroot/wp-content/plugins/gutena-forms/assets/js/admin.js
document.addEventListener("DOMContentLoaded", function(){
    class GutenaFormsAdmin {
    
        constructor() {
            if ( 'undefined' !== typeof gutenaFormsAdmin && null !== gutenaFormsAdmin && '' !== gutenaFormsAdmin ) {
                setTimeout(() => {
                    this.dismissAdminNotice();
                }, 100);
            }
        }

        //check if given data is empty
        isEmpty( data ){
			return 'undefined' === typeof data || null === data || '' === data;
		};

        //Get parent HTML elemnet
        getParents( el, query ){
            let parents = [];
            while ( el.parentNode !== document.body ) {
                el.matches( query ) && parents.push( el );
                el = el.parentNode;
            }
            return 0 < parents.length ? parents[0] : false ;
        };
        
        //scroll to section from url in case react component may not appear bedore call
        dismissAdminNotice() {

            let dismissBtns = document.querySelectorAll(
                '.gutena-forms-admin-notice .notice-dismiss'
            );
            
            if ( 0 < dismissBtns.length ) {
                let obj  = this;
                for ( let i = 0; i < dismissBtns.length; i++ ) {
                    dismissBtns[ i ].addEventListener( 'click', function () {
                        let notice = obj.getParents( this, '.gutena-forms-admin-notice' );
                        if ( ! obj.isEmpty( notice ) ) {
                            let notice_id = notice.getAttribute('id');
                            fetch( gutenaFormsAdmin.ajax_url, {
                                method: 'POST',
                                credentials: 'same-origin', // <-- make sure to include credentials
                                headers:{
                                    'Content-Type': 'application/x-www-form-urlencoded',
                                    'Accept': 'application/json',
                                    'X-WP-Nonce' : gutenaFormsAdmin.nonce
                                },
                                body: new URLSearchParams({
                                    action:gutenaFormsAdmin.dismiss_notice_action,
                                    gfnonce:gutenaFormsAdmin.nonce,
                                    notice_id:notice_id
                                }),
                            } )
                            .then( ( response ) => response.json() )
                            .then( ( response ) => {
                                notice.remove();
                                //console.log("dismiss notice",notice_id);
                            } ).catch((error) => {
                                console.error('Error:', error);
                            });
                        }
                    })
                }
            }
        }
    }

    const newGutenaFormsAdmin = new GutenaFormsAdmin();
});

Youez - 2016 - github.com/yon3zu
LinuXploit