From e1a7e75a745c0eeb1439abac344841f38fee6d58 Mon Sep 17 00:00:00 2001 From: jsanahuja Date: Thu, 19 Nov 2020 20:46:29 +0100 Subject: [PATCH] Hot test fix iOS issue #92 --- jquery.instagramFeed.js | 5 +++-- jquery.instagramFeed.min.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jquery.instagramFeed.js b/jquery.instagramFeed.js index 14c039f..3bb2a7b 100644 --- a/jquery.instagramFeed.js +++ b/jquery.instagramFeed.js @@ -122,7 +122,7 @@ profile_name: ' style="font-size:1.2em;"', profile_biography: ' style="font-size:1em;"', gallery_image: ' style="width:100%;"', - gallery_image_link: ' style="width:' + width + '%; margin:' + options.margin + '%;position:relative; display: inline-flex; height: 100%;"' + gallery_image_link: ' style="width:' + width + '%; margin:' + options.margin + '%;position:relative; display: inline-block; height: 100%;"' }; if(options.display_captions){ @@ -133,10 +133,11 @@ font-size: 0.8rem;\ color: black;\ position: absolute;\ + left: 0;\ + right: 0;\ bottom: 0;\ padding: 1%;\ max-height: 100%;\ - width: 100%;\ overflow-y: auto;\ overflow-x: hidden;\ background-color: hsla(0, 100%, 100%, 0.8);\ diff --git a/jquery.instagramFeed.min.js b/jquery.instagramFeed.min.js index 331435b..79b4463 100644 --- a/jquery.instagramFeed.min.js +++ b/jquery.instagramFeed.min.js @@ -1 +1 @@ -(function(a){function b(a){return a.replace(/[&<>"'`=\/]/g,function(a){return f[a]})}function c(a,b){return"undefined"!=typeof a.node.edge_media_to_caption.edges[0]&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node.text&&null!==a.node.edge_media_to_caption.edges[0].node.text?a.node.edge_media_to_caption.edges[0].node.text:"undefined"!=typeof a.node.title&&null!==a.node.title&&0!=a.node.title.length?a.node.title:"undefined"!=typeof a.node.accessibility_caption&&null!==a.node.accessibility_caption&&0!=a.node.accessibility_caption.length?a.node.accessibility_caption:(this.is_tag?b.name:b.username)+" image "}var d={host:"https://www.instagram.com/",username:"",tag:"",container:"",display_profile:!0,display_biography:!0,display_gallery:!0,display_captions:!1,display_igtv:!1,callback:null,styling:!0,items:8,items_per_row:4,margin:.5,image_size:640,lazy_load:!1,on_error:console.error},e={150:0,240:1,320:2,480:3,640:4},f={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};a.instagramFeed=function(f){var g=a.fn.extend({},d,f);if(""==g.username&&""==g.tag)return g.on_error("Instagram Feed: Error, no username nor tag defined.",1),!1;if("undefined"!=typeof g.get_data&&console.warn("Instagram Feed: options.get_data is deprecated, options.callback is always called if defined"),null==g.callback&&""==g.container)return g.on_error("Instagram Feed: Error, neither container found nor callback defined.",2),!1;var h=""==g.username,i=h?g.host+"explore/tags/"+g.tag+"/":g.host+g.username+"/";return a.get(i,function(d){try{d=d.split("window._sharedData = ")[1].split("")[0]}catch(a){return void g.on_error("Instagram Feed: It looks like the profile you are trying to fetch is age restricted. See https://github.com/jsanahuja/InstagramFeed/issues/26",3)}if(d=JSON.parse(d.substr(0,d.length-1)),d=d.entry_data.ProfilePage||d.entry_data.TagPage,"undefined"==typeof d)return void g.on_error("Instagram Feed: It looks like YOUR network has been temporary banned because of too many requests. See https://github.com/jsanahuja/jquery.instagramFeed/issues/25",4);if(d=d[0].graphql.user||d[0].graphql.hashtag,""!=g.container){var f,j="";if(g.styling){var k=(100-2*g.margin*g.items_per_row)/g.items_per_row;f={profile_container:" style=\"text-align:center;\"",profile_image:" style=\"border-radius:10em;width:15%;max-width:125px;min-width:50px;\"",profile_name:" style=\"font-size:1.2em;\"",profile_biography:" style=\"font-size:1em;\"",gallery_image:" style=\"width:100%;\"",gallery_image_link:" style=\"width:"+k+"%; margin:"+g.margin+"%;position:relative; display: inline-flex; height: 100%;\""},g.display_captions&&(j+="")}else f={profile_container:"",profile_image:"",profile_name:"",profile_biography:"",gallery_image:"",gallery_image_link:""};g.display_profile&&(j+="
",j+="\""+(h?d.name+"",j+=h?"

#"+g.tag+"

":"

@"+d.full_name+" (@"+g.username+")

",!h&&g.display_biography&&(j+="

"+d.biography+"

"),j+="
");var l="undefined"==typeof e[g.image_size]?e[640]:e[g.image_size];if(g.display_gallery)if("undefined"!=typeof d.is_private&&!0===d.is_private)j+="

This profile is private

";else{var m=(d.edge_owner_to_timeline_media||d.edge_hashtag_to_media).edges;t=m.length>g.items?g.items:m.length,j+=""}if(g.display_igtv&&"undefined"!=typeof d.edge_felix_video_timeline){var s=d.edge_felix_video_timeline.edges,t=s.length>g.items?g.items:s.length;if(0";for(var n=0;n",j+="",j+=""}j+=""}}a(g.container).html(j)}null!=g.callback&&g.callback(d)}).fail(function(a){g.on_error("Instagram Feed: Unable to fetch the given user/tag. Instagram responded with the status code: "+a.status,5)}),!0}})(jQuery); +(function(a){function b(a){return a.replace(/[&<>"'`=\/]/g,function(a){return f[a]})}function c(a,b){return"undefined"!=typeof a.node.edge_media_to_caption.edges[0]&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node.text&&null!==a.node.edge_media_to_caption.edges[0].node.text?a.node.edge_media_to_caption.edges[0].node.text:"undefined"!=typeof a.node.title&&null!==a.node.title&&0!=a.node.title.length?a.node.title:"undefined"!=typeof a.node.accessibility_caption&&null!==a.node.accessibility_caption&&0!=a.node.accessibility_caption.length?a.node.accessibility_caption:(this.is_tag?b.name:b.username)+" image "}var d={host:"https://www.instagram.com/",username:"",tag:"",container:"",display_profile:!0,display_biography:!0,display_gallery:!0,display_captions:!1,display_igtv:!1,callback:null,styling:!0,items:8,items_per_row:4,margin:.5,image_size:640,lazy_load:!1,on_error:console.error},e={150:0,240:1,320:2,480:3,640:4},f={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};a.instagramFeed=function(f){var g=a.fn.extend({},d,f);if(""==g.username&&""==g.tag)return g.on_error("Instagram Feed: Error, no username nor tag defined.",1),!1;if("undefined"!=typeof g.get_data&&console.warn("Instagram Feed: options.get_data is deprecated, options.callback is always called if defined"),null==g.callback&&""==g.container)return g.on_error("Instagram Feed: Error, neither container found nor callback defined.",2),!1;var h=""==g.username,i=h?g.host+"explore/tags/"+g.tag+"/":g.host+g.username+"/";return a.get(i,function(d){try{d=d.split("window._sharedData = ")[1].split("")[0]}catch(a){return void g.on_error("Instagram Feed: It looks like the profile you are trying to fetch is age restricted. See https://github.com/jsanahuja/InstagramFeed/issues/26",3)}if(d=JSON.parse(d.substr(0,d.length-1)),d=d.entry_data.ProfilePage||d.entry_data.TagPage,"undefined"==typeof d)return void g.on_error("Instagram Feed: It looks like YOUR network has been temporary banned because of too many requests. See https://github.com/jsanahuja/jquery.instagramFeed/issues/25",4);if(d=d[0].graphql.user||d[0].graphql.hashtag,""!=g.container){var f,j="";if(g.styling){var k=(100-2*g.margin*g.items_per_row)/g.items_per_row;f={profile_container:" style=\"text-align:center;\"",profile_image:" style=\"border-radius:10em;width:15%;max-width:125px;min-width:50px;\"",profile_name:" style=\"font-size:1.2em;\"",profile_biography:" style=\"font-size:1em;\"",gallery_image:" style=\"width:100%;\"",gallery_image_link:" style=\"width:"+k+"%; margin:"+g.margin+"%;position:relative; display: inline-block; height: 100%;\""},g.display_captions&&(j+="")}else f={profile_container:"",profile_image:"",profile_name:"",profile_biography:"",gallery_image:"",gallery_image_link:""};g.display_profile&&(j+="
",j+="\""+(h?d.name+"",j+=h?"

#"+g.tag+"

":"

@"+d.full_name+" (@"+g.username+")

",!h&&g.display_biography&&(j+="

"+d.biography+"

"),j+="
");var l="undefined"==typeof e[g.image_size]?e[640]:e[g.image_size];if(g.display_gallery)if("undefined"!=typeof d.is_private&&!0===d.is_private)j+="

This profile is private

";else{var m=(d.edge_owner_to_timeline_media||d.edge_hashtag_to_media).edges;t=m.length>g.items?g.items:m.length,j+=""}if(g.display_igtv&&"undefined"!=typeof d.edge_felix_video_timeline){var s=d.edge_felix_video_timeline.edges,t=s.length>g.items?g.items:s.length;if(0";for(var n=0;n",j+="",j+=""}j+=""}}a(g.container).html(j)}null!=g.callback&&g.callback(d)}).fail(function(a){g.on_error("Instagram Feed: Unable to fetch the given user/tag. Instagram responded with the status code: "+a.status,5)}),!0}})(jQuery);