HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/testingff/public_html/fdfctr/wp-content/plugins/pretty-link/js/quick_create.js
jQuery(function ($) {
  var $error = $('#prli-quick-create-error'),
    $loading = $('#prli-quick-create-loading'),
    showError = function (message) {
      $error.html(
        $('<div class="notice notice-error">').append(
          $('<p>').text(message)
        )
      ).show();
    };

  $('#prli-quick-create').on('submit', function (e) {
    e.preventDefault();

    $error.hide();
    $loading.show();

    $.ajax({
      type: 'POST',
      url: PrliQuickCreate.ajaxUrl,
      data: {
        action: 'prli_quick_create',
        _ajax_nonce: PrliQuickCreate.nonce,
        url: $('#prli-quick-create-url').val(),
        slug: $('#prli-quick-create-slug').val()
      },
      dataType: 'json'
    }).done(function (response) {
      if (response && typeof response === 'object') {
        if (response.success) {
          window.location = response.data.redirect;
        } else {
          showError(response.data.message);
        }
      } else {
        showError(PrliQuickCreate.invalidServerResponse);
      }
    }).fail(function () {
      showError(PrliQuickCreate.ajaxError);
    }).always(function () {
      $loading.hide();
    });
  });
});