HEX
Server: LiteSpeed
System: Linux venus 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: axxoncom (1007)
PHP: 8.3.19
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/axxoncom/domains/feedtheneed.org.pk/public_html/wp-content/plugins/selection-lite/js/admin.js
/**
 * Selection Lite
 * Carefully selected Elementor addons bundle, for building the most awesome websites
 *
 * @encoding        UTF-8
 * @version         1.15
 * @copyright       (C) 2018 - 2023 Merkulove ( https://merkulov.design/ ). All rights reserved.
 * @license         GPLv3
 * @contributors    merkulove, vladcherviakov, phoenixmkua, podolianochka, viktorialev01
 * @support         help@merkulov.design
 **/

window.addEventListener( 'DOMContentLoaded', (event) => {

    /**
     * Add to the grid third element if needed
     */
    function arrangeGrid() {

        const grids = document.querySelectorAll( '.mdp-selection-grid' );
        const isTriple = window.innerWidth > 1280;

        for ( const grid of grids ) {

            const gridItems = grid.querySelectorAll( '.mdp-selection-widget' );
            const twoInRow = ( ( gridItems.length / 3 ) - Math.floor( gridItems.length / 3 ) ) > 0.65;

            if ( isTriple && twoInRow ) {

                const emptyDiv = document.createElement( 'div' );
                emptyDiv.className = 'mdp-selection-widget mdp-empty';

                grid.appendChild( emptyDiv );

            }

        }

    }

    /** Init function */
    arrangeGrid();


    /** Custom CSS */
    function customCSSInit() {
        ( function ( $ ) {
            let $custom_css_fld = $('#mdp_custom_css_fld');

            if (!$custom_css_fld.length) {
                return;
            }

            if ( ! wp.codeEditor ) { return; }

            let editorSettings = wp.codeEditor.defaultSettings ? _.clone(wp.codeEditor.defaultSettings) : {};
            editorSettings.codemirror = _.extend(
                {},
                editorSettings.codemirror, {
                    indentUnit: 2,
                    tabSize: 2,
                    mode: 'css'
                }
            );

            let css_editor;
            css_editor = wp.codeEditor.initialize( 'mdp_custom_css_fld', editorSettings );

            css_editor.codemirror.on( 'change', function( cMirror ) {
                css_editor.codemirror.save(); // Save data from CodeEditor to textarea.
                $custom_css_fld.change();
            } );
        }( jQuery ) );
    }
    customCSSInit();

});