HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/s/l/y/slyfwmm/pianob/wp-content/themes/zk-monaco/inc/metacore/assets/js/upload.js
(function($) { "use strict";
jQuery(document).ready(function($){
    if($('.cshero_upload_button').length >= 1) {
        window.cshero_uploadfield = '';

        $('.cshero_upload_button').on('click', function() {
            window.cshero_uploadfield = $('.upload_field', $(this).parent());
            tb_show('Upload', 'media-upload.php?type=file&TB_iframe=true', false);

            return false;
        });

        $('.cshero_clear_button').click(function () {
			var clear_id = $(this).attr("data-id");
			$("#"+clear_id+"").val("");
		})

        window.cshero_send_to_editor_backup = window.send_to_editor;
        window.send_to_editor = function(html) {
            if(window.cshero_uploadfield) {
                var file_url = $('img', html).attr('src');
                if(file_url == undefined){
                	file_url = $("a", '<div>'+html+'<div>').attr("href");
                }
                console.log(this);
                $(window.cshero_uploadfield).val(file_url);
                window.cshero_uploadfield = '';
                tb_remove();
            } else {
                window.cshero_send_to_editor_backup(html);
            }
        }
    }
});
})(jQuery);