Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/clinic.corals.io/public/assets/front/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/clinic.corals.io/public/assets/front/js/plugins.instagram.js
window.scwInstagramPlugin = window.scwInstagramPlugin || {};

window.SEMICOLON_instagramPhotosInit = function ($instagramPhotosEl) {

    if ($instagramPhotosEl.length < 1) {
        return true;
    }

    $instagramPhotosEl.each(function () {
        let element = $(this),
            elLimit = element.attr('data-count') || 12,
            elLoader = element.attr('data-loader') ||
                'include/instagram/instagram.php',
            elFetch = element.attr('data-fetch-message') ||
                'Fetching Photos from Instagram...';

        if (Number(elLimit) > 12) {
            elLimit = 12;
        }

        SEMICOLON_getInstagramPhotos(element, elLoader, elLimit, elFetch);
    });

};

window.SEMICOLON_getInstagramPhotos = function (
    element, loader, limit, fetchAlert) {

    let newimages = '';

    element.after(
        '<div class="alert alert-warning instagram-widget-alert text-center"><div class="spinner-grow spinner-grow-sm mr-2" role="status"><span class="visually-hidden">Loading...</span></div> ' +
        fetchAlert + '</div>');

    $.getJSON(loader, function (images) {

        if (images.length > 0) {
            element.parents().find('.instagram-widget-alert').remove();
            let html = '';
            for (let i = 0; i < limit; i++) {
                if (i === limit)
                    continue;

                let photo = images[i],
                    thumb = photo.media_url;
                if (photo.media_type === 'VIDEO') {
                    thumb = photo.thumbnail_url;
                }
                element.append('<a class="grid-item" href="' + photo.permalink +
                    '" target="_blank"><img src="' + thumb +
                    '" alt="Image"></a>');

                // $.getJSON( 'https://graph.instagram.com/' + images[i].id + '?fields=media_url,permalink,media_type,thumbnail_url&access_token=' + accessToken, function( photo ){

                // });

            }
        }

        element.removeClass('customjs');
        setTimeout(function () {
            SEMICOLON.widget.gridInit();
            SEMICOLON.widget.masonryThumbs();
        }, 500);

    });

};

Spamworldpro Mini