Skip to content

Instantly share code, notes, and snippets.

@autos
Last active March 30, 2022 15:17
Show Gist options
  • Save autos/ff4357276f01be1e5d4a to your computer and use it in GitHub Desktop.
Save autos/ff4357276f01be1e5d4a to your computer and use it in GitHub Desktop.
Instagram direct viewer
<html>
<head>
<title>input</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
function myFunction() {
var str1 = document.getElementById('str1').value;
var res1 = str1.split("/p/")[1].split("/")[0];
var res = "https://instagr.am/p/"+res1+"/media/?size=l";
document.getElementById('str1').value = res;
alert(res);
var win = window.open(res, '_blank');
win.focus();
}
</script>
</head>
<body>
<center>
<br />
<br />
<br />
<h2>Paste instagram link</h2>
<br />
<br />
<br />
<br />
<br />
<input type="text" class="form-control input-s" id="str1" style = "width:300px;" />
<button class="btn btn-primary" onclick="myFunction()">Click</button>
</center>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment