Skip to content

Commit

Permalink
main.js updated. fixes #1
Browse files Browse the repository at this point in the history
main.js updated.

Fixes #1
  • Loading branch information
unsuitable001 authored May 21, 2019
1 parent e700493 commit 52dbbd5
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
var isPost=0;
history.navigationMode = 'compatible';
document.body.onload = function(){
isPost = window.location.href.indexOf("instagram.com/p/");
if (isPost != -1){
downloader();
}
else{
document.body.onclick = function(){
setTimeout(() => {
isPost = window.location.href.indexOf("instagram.com/p/");
if (isPost != -1){
if(document.getElementById("iddbtn") == null){
downloader();
}
document.body.onclick = function(){
setTimeout(() => {
isPost = window.location.href.indexOf("instagram.com/p/");
if (isPost != -1){
if(document.getElementById("iddbtn") == null){
downloader();
}
}, 500);
};
}
}
}, 500);
};
};


Expand Down

0 comments on commit 52dbbd5

Please sign in to comment.