403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.155
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/yme/wp-content/plugins/ocean-extra/includes/widgets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/yme/wp-content/plugins/ocean-extra/includes/widgets/js/flickr.js
(function($) {
    function loadFlickrPhotos($scope) {
        var $container = $scope.find('.oceanwp-flickr-container');
        if (!$container.length) {
            return;
        }

        $container.each(function() {
            var $this = $(this);
            var userId = $this.data('user-id');
            var maxPhotos = $this.data('max-photos');
            var containerId = $this.attr('id') || Math.random().toString(36).substring(2);

            // Sanitize the containerId
            containerId = containerId.replace(/[^a-zA-Z0-9_-]/g, '');
            var callbackName = 'jsonFlickrFeed_' + containerId;

            window[callbackName] = function(data) {
                var counter = 0;
                data.items.forEach(function(item) {
                    if (counter < maxPhotos) {
                        var photoUrl = item.media.m.replace('_m.jpg', '_q.jpg');
                        var $img = $('<img>')
                            .attr('src', photoUrl)
                            .attr('alt', item.title || 'Flickr image');
                        $this.append($img);
                        counter++;
                    }
                });

                // Clean up
                delete window[callbackName];
            };

            var feedUrl = 'https://www.flickr.com/services/feeds/photos_public.gne?' +
                'id=' + encodeURIComponent(userId) +
                '&format=json&jsoncallback=' + callbackName;

            var script = document.createElement('script');
            script.src = feedUrl;
            script.onerror = function() {
                console.error('Error loading Flickr feed.');
            };
            document.head.appendChild(script);
        });
    }

    $(document).ready(function() {
        loadFlickrPhotos($(document));
    });

    $(window).on('elementor/frontend/init', function() {
        elementorFrontend.hooks.addAction('frontend/element_ready/widget', function($scope) {
            loadFlickrPhotos($scope);
        });
    });
})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit