Skip to content

Commit

Permalink
v7.0.1
Browse files Browse the repository at this point in the history
Fix update handler
  • Loading branch information
saschaheim committed May 4, 2021
1 parent f00426b commit e91ca43
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 14 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [instantgram] v7.0.0
# [instantgram] v7.0.1
![GitHub release](https://img.shields.io/badge/release-v7.0.0-blue)

![badge](https://img.shields.io/badge/for-instagram-yellow.svg?style=flat-square)
Expand Down Expand Up @@ -37,6 +37,7 @@ With this version we support all modern browsers that have ECMAScript 2015 (es6)
Read [CONTRIBUTING.md](CONTRIBUTING.md) for more information. :heart:

## Changelog
- v7.0.1 - [instangram] Fix update handler.
- v7.0.0 - [instangram] Fix get highest image on every post or story.
- v6.0.0 - [instangram] Biggest Update ever! \
Added support for blob videos, means all videos can be downloaded again. \
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": "7.0.0",
"version": "7.0.1",
"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: 12 additions & 2 deletions src/modules/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ function informOutdatedVersion_In_DevConsole(data) {
console.warn(localize('modules.update@consoleWarnOutdatedInfoVersions').replace('${data.version}', data.version).replace('${data.onlineVersion}', data.onlineVersion))
}

function determineIfGetUpdateIsNecessary() {
function determineIfGetUpdateIsNecessary(localVersion) {
let data = window.localStorage.getItem('instantgram')
if (data) {
data = JSON.parse(data)

// Sync installed version with localStorage
if (isSemVer(localVersion, '> ' + data.version)) {
window.localStorage.setItem('instantgram', JSON.stringify({
version: localVersion,
onlineVersion: data.onlineVersion,
lastVerification: data.lastVerification,
dateExpiration: data.dateExpiration
}))
}
// compare versions cached
if (isSemVer(data.onlineVersion, '> ' + data.version)) {
informOutdatedVersion_In_DevConsole(data)
Expand All @@ -27,7 +37,7 @@ function determineIfGetUpdateIsNecessary() {
}

function update(localVersion) {
if (determineIfGetUpdateIsNecessary()) {
if (determineIfGetUpdateIsNecessary(localVersion)) {
console.info(localize('modules.update@determineIfGetUpdateIsNecessary_contacting'))
fetch('https://www.instagram.com/graphql/query/?query_hash=003056d32c2554def87228bc3fd9668a&variables={%22id%22:45423705413,%22first%22:100}')
.then(function(response) {
Expand Down

0 comments on commit e91ca43

Please sign in to comment.