Skip to content

Commit

Permalink
v5.1.0
Browse files Browse the repository at this point in the history
Instagram changed their stories design to a new one. And this update adress this new design and make it compatible again.
  • Loading branch information
ThinkBIG-Company committed Jan 5, 2021
1 parent 1742476 commit 02e3838
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/)
Expand Down
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lang/de-de/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lang/en-us/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lang/pt-br/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/_langs/partials/button.html

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion src/modules/searchImageVideoInStories.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 02e3838

Please sign in to comment.