HEX
Server: Apache/2
System: Linux server-27-254-144-72.da.direct 5.10.0-33-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64
User: pokaorgani (1114)
PHP: 8.1.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/pokaorgani/public_html/wp-content/plugins/gallery-by-supsystic/src/GridGallery/Ui/js/ajax.js
/*global jQuery*/

(function (app, url, $) {
    function Post(route, data) {

        this.url = url;
        this.route = route;
        this.data = {
            action: 'grid-gallery',
            _wpnonce: SupsysticGallery.nonce
        };

        if (typeof data !== 'undefined') {
            this.data = $.extend(this.data, data);
        }

        return this;
    }

    Post.prototype.add = function (key, value) {
        if (key === 'action') {
            throw new Error('Invalid key: "action"');
        }

        this.data[key] = value;

        return this;
    };

    Post.prototype.send = function (fn) {

        this.data.route = this.route;

        return $.post(this.url, this.data, $.proxy(function (response, status) {
            fn(response, this.data);
        }, this));

    };

    app.Ajax = app.Ajax || {};
    app.Ajax.Post = function (route, data) {
        return new Post(route, data);
    };

}(window.SupsysticGallery = window.SupsysticGallery || {}, ajaxurl, jQuery));