From 02e383850e383b87c80e3b4829911aded8c99e0d Mon Sep 17 00:00:00 2001 From: ThinkBIG-Company Date: Tue, 5 Jan 2021 14:56:05 +0100 Subject: [PATCH] v5.1.0 Instagram changed their stories design to a new one. And this update adress this new design and make it compatible again. --- README.md | 4 ++-- dist/main.js | 2 +- index.html | 4 ++-- lang/de-de/index.html | 4 ++-- lang/en-us/index.html | 4 ++-- lang/pt-br/index.html | 4 ++-- package.json | 2 +- src/_langs/partials/button.html | 2 +- src/modules/searchImageVideoInStories.js | 14 +++++++++++++- 9 files changed, 26 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f1bc795..c006a8c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# [instantgram] v5.0.2 -![GitHub release](https://img.shields.io/badge/release-v5.0.2-blue) +# [instantgram] v5.1.0 +![GitHub release](https://img.shields.io/badge/release-v5.1.0-blue) ![badge](https://img.shields.io/badge/for-instagram-yellow.svg?style=flat-square) [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/) diff --git a/dist/main.js b/dist/main.js index 7cc9de4..f1d3f9f 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t=t||window||document.documentElement;var n=e.getBoundingClientRect();return n.bottom>0&&n.right>0&&n.left<(t.innerWidth||t.clientWidth)&&n.top<(t.innerHeight||t.clientHeight)}},function(e,t,n){"use strict";var r=c(n(2)),a=c(n(4)),i=c(n(5)),o=c(n(6)),l=c(n(7)),d=c(n(8)),s=c(n(9)),u=c(n(10));function c(e){return e&&e.__esModule?e:{default:e}}var g={VERSION:"5.0.2",context:{hasMsg:!1,msg:""},hostname:window.location.hostname,path:window.location.pathname,videos:document.querySelectorAll("video"),regexHostname:/instagram\.com/,regexRootPath:/\//,regexPostPath:/^\/p\//,regexStoriesURI:/stories\/(.*)+/,regexOriginalImage:/\/[a-z]+\d+[a-z]?x\d+[a-z]?/,regexMaxResImage:/\/[a-z]+[1080]+[a-z]?x[1080]+[a-z]?/,alertNotInInstagramPost:!1,foundByModule:null,foundVideo:!1,foundImage:!1,imageLink:!1,imageLinkBeforeParse:!1,setImageLink:function(e){this.imageLink=e}};g.regexHostname.test(g.hostname)||window.alert((0,r.default)("index@alert_onlyWorks")),g.regexHostname.test(g.hostname)&&(!1===(0,a.default)(g)&&!1===(0,i.default)(g)&&!1===(0,o.default)(g)&&!1===(0,l.default)(g)&&!1===(0,d.default)(g)&&!1===(0,s.default)(g)&&!1===(0,u.default)(g)&&(g.context.hasMsg=!1),g.context.hasMsg&&window.alert((0,r.default)(g.context.msg)),!g.alertNotInInstagramPost||g.foundVideo||g.foundImage||window.alert((0,r.default)("index#program@alert_dontFound")))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(3),i=(r=a)&&r.__esModule?r:{default:r};var o={de:"de-DE",pt:"pt-BR",en:"en-US","en-GB":"en-US"}[navigator.language];function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;try{if(i.default.langs.hasOwnProperty(t)||(t="en-US"),i.default.langs[t][e])return i.default.langs[t][e]}catch(n){return console.error("[instantgram]LOC error:",n),"ops, an error ocurred in localization system. Enter in https://github.com/ThinkBIG-Company/instantgram/issues/new and open an issue with this code: 'LOC_dont_found_str_neither_default:["+t+"->"+e+"]'\n for more information open the console"}}console.info(l("helpers.localize_defaultlang").replace("${LANG_DEFAULT}",o)),t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={langs:{"en-US":{"helpers.localize_defaultlang":"[instantgram] set language: ${LANG_DEFAULT} \n For more information about available languages please check http://thinkbig-company.github.io/instantgram","modules.update@oudated_outdated":"[instantgram] is outdated. Please check http://thinkbig-company.github.io/instantgram for available updates.","modules.update@oudated_localInfo":"[instantgram] Installed version: ${data.version} | New update: ${data.gitVersion}","modules.update@determineIfGetUpdateIsNecessary_contacting":"[instantgram] is looking for available updates…","modules.update@determineIfGetUpdateIsNecessary_updated":"[instantgram] updated your current version.","modules.update@determineIfGetUpdateIsNecessary_@alert_found":'[instantgram] found a new available update.\nPlease check http://thinkbig-company.github.io/instantgram to install it.',"index@alert_onlyWorks":"[instantgram] only works on instagram.com.","index#program#modal@alert_dontFound":"[instantgram] didn't find any image in this Instagram post. Please try to open the link in a new tab.","index#program#post@alert_dontFound":"Ops, [instantgram] couldn't find any image :-(","index#program#screen@alert_dontFound":"[instantgram] found more than 1 image. Are you on a profile page? If yes, please open a single post first and open [instantgram] again.","index#program@alert_dontFound":"Ops, did you open any Instagram post? Like for example instagram.com/p/82jd828jd","index#program@alert_videoBlob":"If you're trying open a video, try enter on Instagram post page. Like for example instagram.com/p/82jd828jd. If you're already in it, try refreshing the page before running [instantgram] or open the post in a new tab. (this proccess is neccessary only for videos)"},"pt-BR":{"helpers.localize_defaultlang":"[instantgram] idioma configurado: ${LANG_DEFAULT} \npara mais informações sobre os idiomas suportados, acesse http://thinkbig-company.github.io/instantgram","modules.update@oudated_outdated":"[instantgram] está desatualizado. Acesse http://thinkbig-company.github.io/instantgram para atualizar","modules.update@oudated_localInfo":"[instantgram] versão local: ${data.version} | nova versão: ${data.gitVersion}","modules.update@determineIfGetUpdateIsNecessary_contacting":"[instantgram] está procurando atualizações...","modules.update@determineIfGetUpdateIsNecessary_updated":"[instantgram] informações locais atualizadas","modules.update@determineIfGetUpdateIsNecessary_@alert_found":"[instantgram] encontrou uma atualização.\n acesse thinkbig-company.github.io/instantgram para atualizar","index@alert_onlyWorks":"[instantgram] somente funciona no instagram.com","index#program#modal@alert_dontFound":"[instantgram] não encontrou uma imagem em um post. Tente abrir o link em uma nova aba.","index#program#post@alert_dontFound":"ops, [instantgram] não encontrou a imagem :(","index#program#screen@alert_dontFound":"[instantgram] a procura por imagem na tela encontrou mais de 1 imagem. Você está em um perfil? Se sim, abra alguma imagem antes de rodar o [instantgram]","index#program@alert_dontFound":"ops, você está em algum post do instagram? ex: instagram.com/p/82jd828jd","index#program@alert_videoBlob":"Se você está tentando abrir um vídeo, tente entrar na página do post do Instagram. ex: instagram.com/p/82jd828jd. Se você já está na página, tente atualizar a página antes de executar o [instantgram] ou abra o post em uma nova aba. (este processo só é necessário com vídeos)"},"de-DE":{"helpers.localize_defaultlang":"Ausgewählte Sprache: ${LANG_DEFAULT} \n Weitere Informationen zu den unterstützten Sprachen findest du auf http://thinkbig-company.github.io/instantgram","modules.update@oudated_outdated":"[instantgram] ist veraltet. Bitte besuche die Seite http://thinkbig-company.github.io/instantgram für ein Update.","modules.update@oudated_localInfo":"[instantgram] Installierte Version ${data.version} | Neue Version: ${data.gitVersion}","modules.update@determineIfGetUpdateIsNecessary_contacting":"[instantgram] sucht nach neuen verfügbaren Updates…","modules.update@determineIfGetUpdateIsNecessary_updated":"[instantgram] wurde aktualisiert.","modules.update@determineIfGetUpdateIsNecessary_@alert_found":"[instantgram] hat ein neues Update gefunden.\nBitte besuche die Seite http://thinkbig-company.github.io/instantgram, um das Update zu installieren.","index@alert_onlyWorks":"[instantgram] funktioniert nur mit instagram.com.","index#program#modal@alert_dontFound":"[instantgram] konnte kein Bild in diesem Post finden. Bitte öffne den Link in einem neuen Tab.","index#program#post@alert_dontFound":"Ops, [instantgram] konnte leider kein Bild finden :-(","index#program#screen@alert_dontFound":"[instantgram] hat mehr als 1 Bild gefunden. Bist du in der Profilansicht? Falls ja, öffne bitte zuerst einen einzelnen Post und führe [instantgram] erneut aus.","index#program@alert_dontFound":"Ops, hast du einen Instagram Post geöffnet? Zum Beispiel instagram.com/p/82jd828jd","index#program@alert_videoBlob":"If you're trying open a video, try enter on Instagram post page. Like for example instagram.com/p/82jd828jd. If you're already in it, try refreshing the page before running [instantgram] or open the post in a new tab. (this proccess is neccessary only for videos) // we need translate this string to Deutsch, if you can help us enter in contact by Github"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1;if(e.regexRootPath.test(e.path))try{e:if(1!==document.querySelectorAll("main > section").length);else{for(var n=document.querySelector("main > section").querySelectorAll("div > div > div > article"),r=void 0,a=0;a div > div > div > video");if(null!==l){r=l.src;break}}if(null!=a&&null!=n[a]){var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[a].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("video").length){r=f.querySelector("video").src;break}}}if(r){if(-1!==r.indexOf("blob:")){e.context={hasMsg:!0,msg:"index#program@alert_videoBlob"};break e}window.open(r),t=!0,e.foundVideo=!0,e.foundByModule="searchVideoInFeed",e.alertNotInInstagramPost=!0}}}catch(t){console.error("searchVideoInFeed()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tn&&(n=r,t=a[0])})),t}return e.getAttribute("src")};try{var r=document.getElementById("react-root"),a=r.querySelectorAll("video > source"),i=r.querySelectorAll("img[srcset]"),o="";if(a.length>0?o=a[0].src:1==i.length&&(o=n(i[0]).length>0?n(i[0]):i[0].src),o&&(o=o.replace("amp;","&"),e.setImageLink(o),window.open(e.imageLink),t=!0,e.foundImage=!0,e.foundByModule="searchImageVideoInStories"),!1===t&&e.videos.length>0){var l=e.videos[0].src;!l&&e.videos[0].children&&(l=e.videos[0].children[0].src),l&&(window.open(l),t=!0,e.foundVideo=!0,e.foundByModule="searchImageVideoInStories",e.alertNotInInstagramPost=!0)}}catch(t){console.error("searchImageVideoInStories()","[instantgram] "+e.VERSION,t)}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1;if(e.regexPostPath.test(e.path))try{e:if(1!==document.getElementsByTagName("article").length);else{for(var n=document.querySelector("main").querySelectorAll("div > div > article"),r=void 0,a=0;a div > div > div > video");if(null!==l){r=l.src;break}}var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[0].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("video").length){r=f.querySelector("video").src;break}}if(r){if(-1!==r.indexOf("blob:")){e.context={hasMsg:!0,msg:"index#program@alert_videoBlob"};break e}window.open(r),t=!0,e.foundVideo=!0,e.foundByModule="searchVideoInPost",e.alertNotInInstagramPost=!0}}}catch(t){console.error("searchVideoInPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t div > div > div > video");null!==a&&(r=a.src)}var l=[].concat(o(n.querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(l.length>0){r=null;for(var d=void 0,s=!1,u=[].concat(o(n.children[2].querySelector("div > div").children[1].children)),c=0;c1&&(d=c),d==u.length-1){s=!0;break}for(var g=void 0,f=0;f6&&4==d?l[1]:u.length>6&&5==d||u.length>6&&6==d?l[2]:u.length>6&&7==d?l[1]:u.length>6&&8==d?l[2]:l[d-1]),null!==g.querySelector("video").length){r=g.querySelector("video").src;break}}if(r){if(-1!==r.indexOf("blob:")){e.context={hasMsg:!0,msg:"index#program@alert_videoBlob"};break e}window.open(r),t=!0,e.foundVideo=!0,e.foundByModule="searchVideoInModalPost",e.alertNotInInstagramPost=!0}}}catch(t){console.error("searchVideoInModalPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t section").length);else{for(var n=document.querySelector("main > section").querySelectorAll("div > div > div > article"),r=void 0,a=0;a div > div > div > img");if(null!==l){r=l.src;break}}var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[a].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("img[srcset]").length){r=f.querySelector("img[srcset]").src;break}}e.setImageLink(r),e.imageLink?(window.open(e.imageLink),t=!0,e.foundByModule="searchImageInFeed"):e.context={hasMsg:!0,msg:"index#program#post@alert_dontFound"}}}catch(t){console.error("searchImageInFeed()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t div > article"),r=void 0,a=0;a div > div > div > img");if(null!==l){r=l.src;break}}var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[a].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("img[srcset]").length){r=f.querySelector("img[srcset]").src;break}}e.setImageLink(r),e.imageLink?(window.open(e.imageLink),t=!0,e.foundByModule="searchImageInPost"):e.context={hasMsg:!0,msg:"index#program#post@alert_dontFound"}}}catch(t){console.error("searchImageInPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t div > div > div > img");null!==a&&(r=a.src)}var l=[].concat(o(n.querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(l.length>0){r=null;for(var d=void 0,s=!1,u=[].concat(o(n.children[2].querySelector("div > div").children[1].children)),c=0;c1&&(d=c),d==u.length-1){s=!0;break}for(var g=void 0,f=0;f6&&4==d?l[1]:u.length>6&&5==d||u.length>6&&6==d?l[2]:u.length>6&&7==d?l[1]:u.length>6&&8==d?l[2]:l[d-1]),null!==g.querySelector("img[srcset]").length){r=g.querySelector("img[srcset]").src;break}}e.setImageLink(r),e.imageLink?(window.open(e.imageLink),t=!0,e.foundByModule="searchImageInModalPost"):e.context={hasMsg:!0,msg:"index#program#post@alert_dontFound"}}}catch(t){console.error("searchImageInModalPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&n.right>0&&n.left<(t.innerWidth||t.clientWidth)&&n.top<(t.innerHeight||t.clientHeight)}},function(e,t,n){"use strict";var r=c(n(2)),a=c(n(4)),i=c(n(5)),o=c(n(6)),l=c(n(7)),d=c(n(8)),s=c(n(9)),u=c(n(10));function c(e){return e&&e.__esModule?e:{default:e}}var g={VERSION:"5.1.0",context:{hasMsg:!1,msg:""},hostname:window.location.hostname,path:window.location.pathname,videos:document.querySelectorAll("video"),regexHostname:/instagram\.com/,regexRootPath:/\//,regexPostPath:/^\/p\//,regexStoriesURI:/stories\/(.*)+/,regexOriginalImage:/\/[a-z]+\d+[a-z]?x\d+[a-z]?/,regexMaxResImage:/\/[a-z]+[1080]+[a-z]?x[1080]+[a-z]?/,alertNotInInstagramPost:!1,foundByModule:null,foundVideo:!1,foundImage:!1,imageLink:!1,imageLinkBeforeParse:!1,setImageLink:function(e){this.imageLink=e}};g.regexHostname.test(g.hostname)||window.alert((0,r.default)("index@alert_onlyWorks")),g.regexHostname.test(g.hostname)&&(!1===(0,a.default)(g)&&!1===(0,i.default)(g)&&!1===(0,o.default)(g)&&!1===(0,l.default)(g)&&!1===(0,d.default)(g)&&!1===(0,s.default)(g)&&!1===(0,u.default)(g)&&(g.context.hasMsg=!1),g.context.hasMsg&&window.alert((0,r.default)(g.context.msg)),!g.alertNotInInstagramPost||g.foundVideo||g.foundImage||window.alert((0,r.default)("index#program@alert_dontFound")))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(3),i=(r=a)&&r.__esModule?r:{default:r};var o={de:"de-DE",pt:"pt-BR",en:"en-US","en-GB":"en-US"}[navigator.language];function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;try{if(i.default.langs.hasOwnProperty(t)||(t="en-US"),i.default.langs[t][e])return i.default.langs[t][e]}catch(n){return console.error("[instantgram]LOC error:",n),"ops, an error ocurred in localization system. Enter in https://github.com/ThinkBIG-Company/instantgram/issues/new and open an issue with this code: 'LOC_dont_found_str_neither_default:["+t+"->"+e+"]'\n for more information open the console"}}console.info(l("helpers.localize_defaultlang").replace("${LANG_DEFAULT}",o)),t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={langs:{"en-US":{"helpers.localize_defaultlang":"[instantgram] set language: ${LANG_DEFAULT} \n For more information about available languages please check http://thinkbig-company.github.io/instantgram","modules.update@oudated_outdated":"[instantgram] is outdated. Please check http://thinkbig-company.github.io/instantgram for available updates.","modules.update@oudated_localInfo":"[instantgram] Installed version: ${data.version} | New update: ${data.gitVersion}","modules.update@determineIfGetUpdateIsNecessary_contacting":"[instantgram] is looking for available updates…","modules.update@determineIfGetUpdateIsNecessary_updated":"[instantgram] updated your current version.","modules.update@determineIfGetUpdateIsNecessary_@alert_found":'[instantgram] found a new available update.\nPlease check http://thinkbig-company.github.io/instantgram to install it.',"index@alert_onlyWorks":"[instantgram] only works on instagram.com.","index#program#modal@alert_dontFound":"[instantgram] didn't find any image in this Instagram post. Please try to open the link in a new tab.","index#program#post@alert_dontFound":"Ops, [instantgram] couldn't find any image :-(","index#program#screen@alert_dontFound":"[instantgram] found more than 1 image. Are you on a profile page? If yes, please open a single post first and open [instantgram] again.","index#program@alert_dontFound":"Ops, did you open any Instagram post? Like for example instagram.com/p/82jd828jd","index#program@alert_videoBlob":"If you're trying open a video, try enter on Instagram post page. Like for example instagram.com/p/82jd828jd. If you're already in it, try refreshing the page before running [instantgram] or open the post in a new tab. (this proccess is neccessary only for videos)"},"pt-BR":{"helpers.localize_defaultlang":"[instantgram] idioma configurado: ${LANG_DEFAULT} \npara mais informações sobre os idiomas suportados, acesse http://thinkbig-company.github.io/instantgram","modules.update@oudated_outdated":"[instantgram] está desatualizado. Acesse http://thinkbig-company.github.io/instantgram para atualizar","modules.update@oudated_localInfo":"[instantgram] versão local: ${data.version} | nova versão: ${data.gitVersion}","modules.update@determineIfGetUpdateIsNecessary_contacting":"[instantgram] está procurando atualizações...","modules.update@determineIfGetUpdateIsNecessary_updated":"[instantgram] informações locais atualizadas","modules.update@determineIfGetUpdateIsNecessary_@alert_found":"[instantgram] encontrou uma atualização.\n acesse thinkbig-company.github.io/instantgram para atualizar","index@alert_onlyWorks":"[instantgram] somente funciona no instagram.com","index#program#modal@alert_dontFound":"[instantgram] não encontrou uma imagem em um post. Tente abrir o link em uma nova aba.","index#program#post@alert_dontFound":"ops, [instantgram] não encontrou a imagem :(","index#program#screen@alert_dontFound":"[instantgram] a procura por imagem na tela encontrou mais de 1 imagem. Você está em um perfil? Se sim, abra alguma imagem antes de rodar o [instantgram]","index#program@alert_dontFound":"ops, você está em algum post do instagram? ex: instagram.com/p/82jd828jd","index#program@alert_videoBlob":"Se você está tentando abrir um vídeo, tente entrar na página do post do Instagram. ex: instagram.com/p/82jd828jd. Se você já está na página, tente atualizar a página antes de executar o [instantgram] ou abra o post em uma nova aba. (este processo só é necessário com vídeos)"},"de-DE":{"helpers.localize_defaultlang":"Ausgewählte Sprache: ${LANG_DEFAULT} \n Weitere Informationen zu den unterstützten Sprachen findest du auf http://thinkbig-company.github.io/instantgram","modules.update@oudated_outdated":"[instantgram] ist veraltet. Bitte besuche die Seite http://thinkbig-company.github.io/instantgram für ein Update.","modules.update@oudated_localInfo":"[instantgram] Installierte Version ${data.version} | Neue Version: ${data.gitVersion}","modules.update@determineIfGetUpdateIsNecessary_contacting":"[instantgram] sucht nach neuen verfügbaren Updates…","modules.update@determineIfGetUpdateIsNecessary_updated":"[instantgram] wurde aktualisiert.","modules.update@determineIfGetUpdateIsNecessary_@alert_found":"[instantgram] hat ein neues Update gefunden.\nBitte besuche die Seite http://thinkbig-company.github.io/instantgram, um das Update zu installieren.","index@alert_onlyWorks":"[instantgram] funktioniert nur mit instagram.com.","index#program#modal@alert_dontFound":"[instantgram] konnte kein Bild in diesem Post finden. Bitte öffne den Link in einem neuen Tab.","index#program#post@alert_dontFound":"Ops, [instantgram] konnte leider kein Bild finden :-(","index#program#screen@alert_dontFound":"[instantgram] hat mehr als 1 Bild gefunden. Bist du in der Profilansicht? Falls ja, öffne bitte zuerst einen einzelnen Post und führe [instantgram] erneut aus.","index#program@alert_dontFound":"Ops, hast du einen Instagram Post geöffnet? Zum Beispiel instagram.com/p/82jd828jd","index#program@alert_videoBlob":"If you're trying open a video, try enter on Instagram post page. Like for example instagram.com/p/82jd828jd. If you're already in it, try refreshing the page before running [instantgram] or open the post in a new tab. (this proccess is neccessary only for videos) // we need translate this string to Deutsch, if you can help us enter in contact by Github"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1;if(e.regexRootPath.test(e.path))try{e:if(1!==document.querySelectorAll("main > section").length);else{for(var n=document.querySelector("main > section").querySelectorAll("div > div > div > article"),r=void 0,a=0;a div > div > div > video");if(null!==l){r=l.src;break}}if(null!=a&&null!=n[a]){var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[a].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("video").length){r=f.querySelector("video").src;break}}}if(r){if(-1!==r.indexOf("blob:")){e.context={hasMsg:!0,msg:"index#program@alert_videoBlob"};break e}window.open(r),t=!0,e.foundVideo=!0,e.foundByModule="searchVideoInFeed",e.alertNotInInstagramPost=!0}}}catch(t){console.error("searchVideoInFeed()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tn&&(n=r,t=a[0])})),t}return e.getAttribute("src")};try{var r=document.getElementById("react-root"),a=r.querySelectorAll("video > source"),i=r.querySelectorAll("img[srcset]"),o="";if(a.length>0)o=a[0].src;else if(i.length>1){for(var l=void 0,d=0;d0){l=i[d];break}n(l).length>0&&(o=n(l))}else 1==i.length&&(o=n(i[0]).length>0?n(i[0]):i[0].src);if(o&&(o=o.replace("amp;","&"),e.setImageLink(o),window.open(e.imageLink),t=!0,e.foundImage=!0,e.foundByModule="searchImageVideoInStories"),!1===t&&e.videos.length>0){var s=e.videos[0].src;!s&&e.videos[0].children&&(s=e.videos[0].children[0].src),s&&(window.open(s),t=!0,e.foundVideo=!0,e.foundByModule="searchImageVideoInStories",e.alertNotInInstagramPost=!0)}}catch(t){console.error("searchImageVideoInStories()","[instantgram] "+e.VERSION,t)}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!1;if(e.regexPostPath.test(e.path))try{e:if(1!==document.getElementsByTagName("article").length);else{for(var n=document.querySelector("main").querySelectorAll("div > div > article"),r=void 0,a=0;a div > div > div > video");if(null!==l){r=l.src;break}}var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[0].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("video").length){r=f.querySelector("video").src;break}}if(r){if(-1!==r.indexOf("blob:")){e.context={hasMsg:!0,msg:"index#program@alert_videoBlob"};break e}window.open(r),t=!0,e.foundVideo=!0,e.foundByModule="searchVideoInPost",e.alertNotInInstagramPost=!0}}}catch(t){console.error("searchVideoInPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t div > div > div > video");null!==a&&(r=a.src)}var l=[].concat(o(n.querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(l.length>0){r=null;for(var d=void 0,s=!1,u=[].concat(o(n.children[2].querySelector("div > div").children[1].children)),c=0;c1&&(d=c),d==u.length-1){s=!0;break}for(var g=void 0,f=0;f6&&4==d?l[1]:u.length>6&&5==d||u.length>6&&6==d?l[2]:u.length>6&&7==d?l[1]:u.length>6&&8==d?l[2]:l[d-1]),null!==g.querySelector("video").length){r=g.querySelector("video").src;break}}if(r){if(-1!==r.indexOf("blob:")){e.context={hasMsg:!0,msg:"index#program@alert_videoBlob"};break e}window.open(r),t=!0,e.foundVideo=!0,e.foundByModule="searchVideoInModalPost",e.alertNotInInstagramPost=!0}}}catch(t){console.error("searchVideoInModalPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t section").length);else{for(var n=document.querySelector("main > section").querySelectorAll("div > div > div > article"),r=void 0,a=0;a div > div > div > img");if(null!==l){r=l.src;break}}var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[a].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("img[srcset]").length){r=f.querySelector("img[srcset]").src;break}}e.setImageLink(r),e.imageLink?(window.open(e.imageLink),t=!0,e.foundByModule="searchImageInFeed"):e.context={hasMsg:!0,msg:"index#program#post@alert_dontFound"}}}catch(t){console.error("searchImageInFeed()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t div > article"),r=void 0,a=0;a div > div > div > img");if(null!==l){r=l.src;break}}var d=[].concat(o(n[a].querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(d.length>0){r=null;for(var s=void 0,u=!1,c=[].concat(o(n[a].children[2].querySelector("div > div").children[1].children)),g=0;g1&&(s=g),s==c.length-1){u=!0;break}for(var f=void 0,m=0;m6&&4==s?d[1]:c.length>6&&5==s||c.length>6&&6==s?d[2]:c.length>6&&7==s?d[1]:c.length>6&&8==s?d[2]:d[s-1]),null!==f.querySelector("img[srcset]").length){r=f.querySelector("img[srcset]").src;break}}e.setImageLink(r),e.imageLink?(window.open(e.imageLink),t=!0,e.foundByModule="searchImageInPost"):e.context={hasMsg:!0,msg:"index#program#post@alert_dontFound"}}}catch(t){console.error("searchImageInPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t div > div > div > img");null!==a&&(r=a.src)}var l=[].concat(o(n.querySelectorAll("div > div > div > div > div > div > div > ul:first-child > li"))).filter((function(e){return null!=e.firstChild&&e.classList.length>0}));if(l.length>0){r=null;for(var d=void 0,s=!1,u=[].concat(o(n.children[2].querySelector("div > div").children[1].children)),c=0;c1&&(d=c),d==u.length-1){s=!0;break}for(var g=void 0,f=0;f6&&4==d?l[1]:u.length>6&&5==d||u.length>6&&6==d?l[2]:u.length>6&&7==d?l[1]:u.length>6&&8==d?l[2]:l[d-1]),null!==g.querySelector("img[srcset]").length){r=g.querySelector("img[srcset]").src;break}}e.setImageLink(r),e.imageLink?(window.open(e.imageLink),t=!0,e.foundByModule="searchImageInModalPost"):e.context={hasMsg:!0,msg:"index#program#post@alert_dontFound"}}}catch(t){console.error("searchImageInModalPost()","[instantgram] "+e.VERSION,t)}return t};var r,a=n(0),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t

Instantgram

☁️ A bookmarklet for downloading images from Instagram.

- [instantgram 5.0.2]
+ [instantgram 5.1.0]
drag this button to the bookmark bar of your browser. @@ -58,7 +58,7 @@

☁️ A bookmarklet for downloading images from Ins

[instantgram]

-

version +

version badge

[instantgram] is a bookmarklet for downloading single images from Instagram. Tiny, simple, without any further extensions or downloads. Just drag the [instantgram] button to the bookmark bar of your browser, open any Instagram post and click on the bookmarklet. Just works :-)

diff --git a/lang/de-de/index.html b/lang/de-de/index.html index d451da7..1a4470f 100644 --- a/lang/de-de/index.html +++ b/lang/de-de/index.html @@ -50,7 +50,7 @@

Instantgram

☁️ Ein Bookmarklet, um Bilder auf Instagram herunterzuladen

- [instantgram 5.0.2]
+ [instantgram 5.1.0]
Ziehe diesen Button in die Favoritenleiste deines Browsers. @@ -58,7 +58,7 @@

☁️ Ein Bookmarklet, um Bilder auf Instagram heru

[instantgram]

-

version +

version badge

[instantgram] ist ein Bookmarklet, um einzelne Instagram Bilder herunterzuladen. Klein, simpel, ohne Abhängigkeiten zu anderen Erweiterungen oder Downloads. Ziehe einfach den [instantgram] button in die Favoritenleiste deines Browsers, öffne einen einzelnen Instagram Post und klicke auf das Bookmarklet. So einfach :-)

diff --git a/lang/en-us/index.html b/lang/en-us/index.html index 9214fb2..71aee30 100644 --- a/lang/en-us/index.html +++ b/lang/en-us/index.html @@ -50,7 +50,7 @@

Instantgram

☁️ A bookmarklet for downloading images from Instagram.

- [instantgram 5.0.2]
+ [instantgram 5.1.0]
drag this button to the bookmark bar of your browser. @@ -58,7 +58,7 @@

☁️ A bookmarklet for downloading images from Ins

[instantgram]

-

version +

version badge

[instantgram] is a bookmarklet for downloading single images from Instagram. Tiny, simple, without any further extensions or downloads. Just drag the [instantgram] button to the bookmark bar of your browser, open any Instagram post and click on the bookmarklet. Just works :-)

diff --git a/lang/pt-br/index.html b/lang/pt-br/index.html index 0221a24..034a732 100644 --- a/lang/pt-br/index.html +++ b/lang/pt-br/index.html @@ -50,7 +50,7 @@

Instantgram

☁️ Um bookmarklet para download de fotos do Instagram

- [instantgram 5.0.2]
+ [instantgram 5.1.0]
arraste o botão acima para a barra de favoritos do navegador @@ -58,7 +58,7 @@

☁️ Um bookmarklet para download de fotos do Inst

[instantgram]

-

version +

version badge

[instantgram] é um bookmarklet com a função de baixar imagens do Instagram. Pequeno, simples, sem necessidade de extensões ou downloads. Só é necessário arrastar o link do [instantgram] para a barra de favoritos do seu navegador, ir até o instagram.com (versão web), abrir um post e clicar no bookmarklet. Simples e funcional.

diff --git a/package.json b/package.json index 07eea9a..b370c02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "instantgram", - "version": "5.0.2", + "version": "5.1.0", "description": "A bookmarklet for download photos in Instagram", "main": "src/index.js", "scripts": { diff --git a/src/_langs/partials/button.html b/src/_langs/partials/button.html index 3aa51b2..046c20c 100644 --- a/src/_langs/partials/button.html +++ b/src/_langs/partials/button.html @@ -1 +1 @@ -[instantgram 5.0.2] \ No newline at end of file +[instantgram 5.1.0] \ No newline at end of file diff --git a/src/modules/searchImageVideoInStories.js b/src/modules/searchImageVideoInStories.js index 46522c5..1dd7271 100644 --- a/src/modules/searchImageVideoInStories.js +++ b/src/modules/searchImageVideoInStories.js @@ -36,7 +36,19 @@ export default function searchImageVideoInStories(program) { if ($video.length > 0) { story = $video[0].src; } else { - if ($img.length == 1) { + if ($img.length > 1) { + let _mediaEl; + for (let i = 0; i < $img.length; i++) { + if ($img[i].className.length > 0) { + _mediaEl = $img[i]; + break; + } + } + + if (getHighestResImg(_mediaEl).length > 0) { + story = getHighestResImg(_mediaEl); + } + } else if ($img.length == 1) { if (getHighestResImg($img[0]).length > 0) { story = getHighestResImg($img[0]); } else {