Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 18.191.195.180
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/wordpress/wp-content/themes/Divi/core/admin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/wordpress/wp-content/themes/Divi/core/admin/js/version-rollback.js
(function($) {
"use strict";

window.etCore.versionRollback = {
  boot: function() {
    var _this = this;

    $(document).on('click', '.et-core-version-rollback-confirm', function (e) {
      var $a = $(this);

      e.preventDefault();

      _this.rollback($a.attr('href'));
    });
  },

  disableActions: function() {
    $('.et-core-version-rollback-modal .et-core-modal-action').addClass('et-core-disabled');
  },

  enableActions: function() {
    $('.et-core-version-rollback-modal .et-core-modal-action').removeClass('et-core-disabled');
  },

  removeActions: function() {
    $('.et-core-version-rollback-modal .et-core-modal-action').remove();
    $('.et-core-version-rollback-modal').addClass('et-core-modal-actionless');
  },

  rollback: function(url) {
    var success = (function(response) {
      etCore.modalContent( '<div class="et-core-loader et-core-loader-success"></div>', false, false, '#et-core-version-rollback-modal-content' );
      setTimeout(function() {
        window.location.reload();
      }, 2000);
    }).bind(this);

    var error = (function(response) {
      var data;
      if ( response.responseJSON !== undefined ) {
        data = response.responseJSON.data;
      } else {
        data = {
          errorIsUnrecoverable: false,
          error: etCoreVersionRollbackI18n.unknownError
        };
      }

      var removeTempContent = true;
      etCore.modalContent( '<div class="et-core-loader et-core-loader-fail"></div>', false, 2000, '#et-core-version-rollback-modal-content' );

      if (undefined !== typeof data.errorIsUnrecoverable && data.errorIsUnrecoverable) {
        removeTempContent = false;
        this.removeActions();
      }

      setTimeout(function() {
        var content = $('<div></div>').append($('<p></p>').html(data.error)).html();
        etCore.modalContent(content, true, removeTempContent, '#et-core-version-rollback-modal-content');
      }, 2000)
    }).bind(this);

    var complete = (function(response) {
      this.enableActions();
    }).bind(this);

    this.disableActions();
    etCore.modalContent( '<div class="et-core-loader"></div>', false, false, '#et-core-version-rollback-modal-content' );

    // The URL already includes action and nonce.
    $.ajax({
      type: 'POST',
      url: url,
      dataType: 'json',
      success: success,
      error: error,
      complete: complete
    });
  }
};

$(document).ready(function() {
  window.etCore.versionRollback.boot();
});

})(jQuery);

Anon7 - 2022
AnonSec Team