From 52dbbd592f04cb537affa9a0e27aeead51ca2959 Mon Sep 17 00:00:00 2001 From: Soumyadip Mondal Date: Tue, 21 May 2019 12:28:57 +0530 Subject: [PATCH] main.js updated. fixes #1 main.js updated. Fixes #1 --- main.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/main.js b/main.js index b6a034e..5b27b74 100644 --- a/main.js +++ b/main.js @@ -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); + }; };