HEX
Server: Apache
System: Linux webm003.cluster111.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: assotraipi (849654)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/assotraipi/www/wp-content/plugins/download-monitor/assets/js/overview-download.js
(function ( $ ) {

    // we create a copy of the WP inline edit post function
    var $wp_inline_edit = inlineEditPost.edit;

    // and then we overwrite the function with our own code
    inlineEditPost.edit = function ( id ) {

        // "call" the original WP edit function
        // we don't want to leave WordPress hanging
        $wp_inline_edit.apply( this, arguments );

        // now we take care of our business

        // get the post ID
        var $post_id = 0;
        if ( typeof( id ) == 'object' ) {
            $post_id = parseInt( this.getId( id ) );
        }

        if ( $post_id > 0 ) {

            // define rows
            var $edit_row = $( '#edit-' + $post_id );
            var $post_row = $( '#post-' + $post_id );

            // get data
            var featured = ('1' === $( '.column-featured', $post_row ).text() );
            var members_only = ('1' === $( '.column-locked_download span', $post_row ).data('members_only') );
            var redirect_only = ('1' === $( '.column-redirect_only', $post_row ).text() );
            var terms_conditions = ('1' === $( '.column-locked_download span', $post_row ).data('_dlm_tc_locked') );

            // populate data
            $( ':input[name="_featured"]', $edit_row ).prop( 'checked', featured );
            $( ':input[name="_members_only"]', $edit_row ).prop( 'checked', members_only );
            $( ':input[name="_redirect_only"]', $edit_row ).prop( 'checked', redirect_only );
            $( ':input[name="_dlm_tc_locked"]', $edit_row ).prop( 'checked', terms_conditions );
        }
    };

    // Copy shortcode functionality
    $('.copy-dlm-shortcode').click( (e) => {
        e.preventDefault();

        const target = $(e.currentTarget);
        const dlm_shortcode = target.find('input');
        dlm_shortcode.trigger("focus");
        dlm_shortcode.trigger("select");
        document.execCommand('copy');

        if ( 'undefined' !== typeof navigator.clipboard ) {
            navigator.clipboard.writeText(dlm_shortcode.val());
        }

        if ( 'undefined' !== typeof window.ClipboardJS  ) {
            window.ClipboardJS.copy(dlm_shortcode.val());
        }

        $(this).next('span').text($(this).data('item') + ' copied');
        $('.copy-dlm-button').not($(this)).parent().find('span').text('');
        dlm_shortcode.trigger("blur");

        target.find('.wpchill-tooltip-content span').text(dlm_download_overview.shortcode_copied);
        setTimeout(() => {
            target.find('.wpchill-tooltip-content span').text(dlm_download_overview.copy_shortcode);
        }, 1000);
    });

})( jQuery );