trAvis - MANAGER
Edit File: plus-instafeed.min.js
/*Instagram Feed*/(function(a){var b=function(a,b){var c=a.find(".theplus-instagram-feed"),d=c.find(".theplus-insta-grid"),e=d.data("instafeed_by"),f=d.data("caption-count"),g="show-caption"===d.data("caption")?"<span class=\"insta-caption\">{{caption}}</span>":"",h=d.data("popup-image"),i=d.data("loadmore-text"),j=d.data("loading-text"),k="show-instaimage"===d.data("instaimage")?"<div class=\"insta-image\"><a href=\"{{image}}\" class=\"insta-pop-image\"><img src=\""+h+"\" /></a></div>":"",l="yes"===d.data("likes")?"<span class=\"theplus-insta-post-likes\"> <i class=\"far fa-heart\" aria-hidden=\"true\"></i> {{likes}}</span>":"",m="yes"===d.data("comments")?"<span class=\"theplus-insta-post-comments\"><i class=\"far fa-comments\" aria-hidden=\"true\"></i> {{comments}}</span>":"",n="yes"===d.data("link-target")?"target=\"_blank\"":"",o="yes"===d.data("link")?"<a href=\"{{link}}\" "+n+" class=\"insta-link\"></a>":"",p=d.data("carousels"),q=d.data("column"),r=d.data("strager"),s=d.data("layoutstyle");if("style-2"==s)var t="<div class=\"theplus-insta-feed grid-item theplus-insta-box "+q+" "+r+"\"><div class=\"theplus-insta-feed-inner\"><div class=\"theplus-insta-feed-wrap\"><div class=\"theplus-insta-img-wrap\"><img src=\"{{image}}\" /></div><div class=\"theplus-insta-info-wrap\"><div class=\"theplus-insta-info-wrap-inner\">"+g+"</div><div class=\"insta-like-comment-img\"><div class=\"theplus-insta-likes-comments\">"+l+m+"</div>"+k+"</div></div>"+o+"</div></div></div>";else var t="<div class=\"theplus-insta-feed grid-item theplus-insta-box "+q+" "+r+"\"><div class=\"theplus-insta-feed-inner\"><div class=\"theplus-insta-feed-wrap\"><div class=\"theplus-insta-img-wrap\"><img src=\"{{image}}\" /></div><div class=\"theplus-insta-info-wrap\"><div class=\"theplus-insta-info-wrap-inner\"><div class=\"theplus-insta-likes-comments\">"+k+l+m+"</div>"+g+"</div>"+o+"</div></div></div></div>";if(0<c.length)if("username"==e){var u=d.data("username");if(""!=u&&null!=u){b.ajax({url:"https://www.instagram.com/"+u,type:"GET",success:function(b){b=b.split("window._sharedData = "),b=b[1].split("</script>"),b=b[0],b=b.substr(0,b.length-1),b=JSON.parse(b),b=b.entry_data.ProfilePage[0].graphql.user;var e="";if(b.is_private)e+="<div class='plus-insta-private'><strong>This profile is private</strong></div>";else{var f=b.edge_owner_to_timeline_media.edges;max=f.length>d.data("limit")?d.data("limit"):f.length;for(var j=0;j<max;j++){if(l="yes"===d.data("likes")?"<span class=\"theplus-insta-post-likes\"> <i class=\"far fa-heart\" aria-hidden=\"true\"></i> "+f[j].node.edge_media_preview_like.count+"</span>":"",m="yes"===d.data("comments")?"<span class=\"theplus-insta-post-comments\"><i class=\"far fa-comments\" aria-hidden=\"true\"></i> "+f[j].node.edge_media_to_comment.count+"</span>":"",k="show-instaimage"===d.data("instaimage")?"<div class=\"insta-image\"><a href=\""+f[j].node.display_url+"\" class=\"insta-pop-image\"><img src=\""+h+"\" /></a></div>":"",0<f[j].node.edge_media_to_caption.edges.length){var p=d.data("caption-count"),t=f[j].node.edge_media_to_caption.edges[0].node.text,u=t.substring(0,p);g="show-caption"===d.data("caption")?"<span class=\"insta-caption\">"+u+"</span>":""}else g="";o="yes"===d.data("link")?"<a href=\"https://www.instagram.com/p/"+f[j].node.shortcode+"\" "+n+" class=\"insta-link\"></a>":"",e+="style-2"==s?"<div class=\"theplus-insta-feed grid-item theplus-insta-box "+q+" "+r+"\"><div class=\"theplus-insta-feed-inner\"><div class=\"theplus-insta-feed-wrap\"><div class=\"theplus-insta-img-wrap\"><img src=\""+f[j].node.display_url+"\" /></div><div class=\"theplus-insta-info-wrap\"><div class=\"theplus-insta-info-wrap-inner\">"+g+"</div><div class=\"insta-like-comment-img\"><div class=\"theplus-insta-likes-comments\">"+l+m+"</div>"+k+"</div></div>"+o+"</div></div></div>":"<div class=\"theplus-insta-feed grid-item theplus-insta-box "+q+" "+r+"\"><div class=\"theplus-insta-feed-inner\"><div class=\"theplus-insta-feed-wrap\"><div class=\"theplus-insta-img-wrap\"><img src=\""+f[j].node.display_url+"\" /></div><div class=\"theplus-insta-info-wrap\"><div class=\"theplus-insta-info-wrap-inner\"><div class=\"theplus-insta-likes-comments\">"+k+l+m+"</div>"+g+"</div>"+o+"</div></div></div></div>"}}c.find(".post-inner-loop").html(e),c.find(".plus-insta-loading").addClass("loaded");var v=c.find(".theplus-insta-grid");if(0<c.find(".insta-masonry-layout").length&&(v.isotope({columnWidth:".theplus-insta-feed",itemSelector:".grid-item",percentPosition:!0}),v.imagesLoaded().progress(function(){v.isotope("layout")})),0<c.find(".list-carousel-slick").length){var w=a.find(".list-carousel-slick").eq(0);v.imagesLoaded().progress(function(){0<w.length&&!w.hasClass("done-carousel")&&theplus_carousel_list("instagram")})}}})}else c.find(".post-inner-loop").html("<div class='plus-insta-private'><strong>Enter Instagram Username</strong></div>"),c.find(".plus-insta-loading").addClass("loaded")}else{var v=d.data("user-id"),w=d.data("access-token"),x=d.data("client-id"),y=d.data("limit"),z=d.data("resolution"),A=d.data("target"),B=d.data("id"),C=d.data("sort-by");if((""!=w&&null!=w||""!=x&&null!=x)&&""!=v&&null!=v){function d(a){var c=b(".insta-masonry-layout."+a);c.isotope({columnWidth:".theplus-insta-feed",itemSelector:".grid-item",percentPosition:!0}),c.imagesLoaded().progress(function(){c.isotope("layout")})}var D=c.find(".theplus-load-more-button"),E=new Instafeed({get:"user",userId:v,clientId:""+x+"",accessToken:""+w+"",limit:""+y+"",resolution:""+z+"",sortBy:""+C+"",target:""+A+"",template:t,after:function(){var e=b(this);if(e.classList?e.classList.add("show"):e.className+=" show",this.hasNext()||(b(D).parent().addClass("no-pagination"),D.attr("disabled","disabled")),c.find(".plus-insta-loading").addClass("loaded"),d(B),0<c.find(".list-carousel-slick").length){var g=a.find(".list-carousel-slick").eq(0);c.find(".theplus-insta-grid").imagesLoaded().progress(function(){0<g.length&&!g.hasClass("done-carousel")&&theplus_carousel_list("instagram")})}c.find(".post-inner-loop .grid-item").length&&c.find(".post-inner-loop .grid-item").each(function(){var a=b(this).find(".insta-caption").text();if(a){var c=a.substring(0,f);b(".insta-caption",this).text(c)}})},success:function(){b(D).removeClass("button--loading"),b(D).find("span").html(i)}});D.on("click",function(){E.next(),b(D).addClass("button--loading"),b(D).find("span").html(j)}),E.run()}}};a(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/tp-instagram.default",b)})})(jQuery);