HEX
Server: Apache
System: Linux edrants.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: fye (10002)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/followyourears.com/httpdocs/wp-content/themes/hatch/admin/functions-admin.js
jQuery(document).ready(function($) {

    var formfield;
              
    // Upload image         
    $('#hatch_favicon_upload_button, #hatch_logo_upload_button').click(function() {
        formfield = $(this).prev().attr('id');
        tbframe_interval = setInterval(function() {
            $('#TB_iframeContent').contents().find('.savesend input[type="submit"]').val(js_text.insert_into_post);
        }, 500);
        tb_show('', 'media-upload.php?post_id=0&type=image&TB_iframe=true');
        return false;
    });

    // Insert the image url into the input field
    window.original_send_to_editor = window.send_to_editor;
    window.send_to_editor = function(html) {  
        if (formfield) {      
            fileurl = $('img', html).attr('src');  
            $('#' + formfield).val(fileurl);     
            tb_remove();
            formfield = '';
        } else {
            window.original_send_to_editor(html);
        }
    } 

    // Colorpicker
    jQuery('#colorpicker_link_color').farbtastic('#hatch_theme_settings-hatch_link_color');
    
    jQuery('#hatch_theme_settings-hatch_link_color').blur( function() {
            jQuery('#colorpicker_link_color').hide();
    });
    
    jQuery('#hatch_theme_settings-hatch_link_color').focus( function() {
            jQuery('#colorpicker_link_color').show();
    });
             
});