403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.150
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/public_html/wp-content/plugins/woocommerce-currency-switcher/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/public_html/wp-content/plugins/woocommerce-currency-switcher/js/admin.js
"use strict";

(function ($, window) {

    jQuery(function () {
        jQuery('.form-table .forminp #woocommerce_currency').parents('tr').remove();
        jQuery('.form-table .forminp #woocommerce_currency_pos').parents('tr').remove();

    });


    document.addEventListener('woocs_admin_theme_id', function (e) {
        jQuery.post(ajaxurl, {
            action: "woocs_admin_theme_id",
            theme_id: parseInt(e.detail.value, 10)
        }, function () {
            window.location.reload();
        });
    });


})(jQuery, window);

jQuery(function ($) {

    jQuery('body').append('<div id="woocs_buffer" style="display: none;"></div>');

});


function woocs_insert_html_in_buffer(html) {
    jQuery('#woocs_buffer').html(html);
}
function woocs_get_html_from_buffer() {
    return jQuery('#woocs_buffer').html();
}

function woocs_show_info_popup(text, delay) {
    jQuery(".info_popup").text(text);
    jQuery(".info_popup").fadeTo(400, 0.9);
    window.setTimeout(function () {
        jQuery(".info_popup").fadeOut(400);
    }, delay);
}

function woocs_show_stat_info_popup(text) {
    jQuery(".info_popup").text(text);
    jQuery(".info_popup").fadeTo(400, 0.9);
}


function woocs_hide_stat_info_popup() {
    window.setTimeout(function () {
        jQuery(".info_popup").fadeOut(400);
    }, 500);
}
function woocs_auto_hide_color() {
    if (jQuery('#woocs_is_auto_switcher').val() == 0) {
        jQuery('#woocs_auto_switcher_color').parents('tr').hide();
        jQuery('#woocs_auto_switcher_hover_color').parents('tr').hide();
    }
}
woocs_auto_hide_color();

function woocs_check_api_key_field() {
    var aggregator = jQuery("select[name=woocs_currencies_aggregator]").val();

    if (typeof aggregator == 'undefined') {
	return;
    }
    var is_api = ['free_converter', 'fixer', 'currencylayer', 'openexchangerates', 'currencyapi'];
    let tr = document.querySelector('input[name=woocs_aggregator_key]').closest('tr');
    if (jQuery.inArray(aggregator, is_api) != -1) {
        jQuery(tr).show();
    } else {
        jQuery(tr).hide();
    }
}


woocs_check_api_key_field();
jQuery("select[name=woocs_currencies_aggregator]").on('change', function () {
    woocs_check_api_key_field();
});



function woocs_check_storage_type() {
    var storage = jQuery("#woocs_storage").val();

    if (jQuery.inArray(storage, ['memcached', 'redis']) !== -1) {
        jQuery("#woocs_storage_server").parents("tr").show();
        jQuery("#woocs_storage_port").parents("tr").show();
    } else {
        jQuery("#woocs_storage_server").parents("tr").hide();
        jQuery("#woocs_storage_port").parents("tr").hide();
    }
}

woocs_check_storage_type();
jQuery("#woocs_storage").on('change', function () {
    woocs_check_storage_type();
});



function woocs_set_cookie(name, value, days = 365) {
    var expires = "";
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        expires = "; expires=" + date.toUTCString();
    }
    document.cookie = name + "=" + (value || "") + expires + "; path=/";
}

function woocs_get_cookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ')
            c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0)
            return c.substring(nameEQ.length, c.length);
    }
    return null;
}


Youez - 2016 - github.com/yon3zu
LinuXploit