-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtinygram.html
1 lines (1 loc) · 3.97 KB
/
tinygram.html
1
<title>Tinygram</title><style>.i {float: right;width: 70%;padding-top: 16px;}div.i span {text-align,float: left;padding: 0 20 0 0;}</style><body style="font-family: Arial;"><div id="o" style="display: none;position: fixed;width:100%;height: 100%;background-color: rgba(0,0,0,0.5);top: 0;left: 0;z-index: 1;"></div><div id="m" style="display:none;position: fixed;z-index:2;left: 50%;top: 50%;transform: translate(-50%, -50%);"><img id="mi" style="width: 100%"><div class="i" style="background-color: #fff;padding-top: -5px;width: 100%;"><span id="c" style="padding: 0 0 20 10;width: 60%;"></span><span id="l" style="float: right;padding: 0 10 20 0;"></span></div></div><div class="n" style="position: fixed;width: 100%;top: 0;left: 0;background: #fff;"><div style="float:left;margin: 20 10 20 30;"><a href="http://u.nu/h1fw"><svg width="32" height="32" style="stroke:black;fill: white;stroke-width:2;"> <rect x="2" y="2" rx="6" ry="6" width="24" height="24"/> <circle cx="14" cy="14" r="6"/> <circle cx="21" cy="7" r="1" stroke-width="1" fill="black" /></svg></a></div><div style="margin-top: 22px;font-size: 20px;width: 20%;"><span>Tinygram</span></div><div style="float: right;width: 15%;margin-top: -20px;"><div style="width: 100%;"><select id="y" onchange="s();" style="float: left;width: 20%;"><option value="n">-</option><option value="u">@</option><option value="h">#</option></select><input id="k" style="float: right;width: 65%;margin: 0 20 0 0;" type="text" name=""></div></div></div><div style="margin-top: 80px;"><div style="float: left;width: 23%;"><p></div><div style="float: left;width: 54%;"><div style="float: left;width: 100%;margin-top: 44px;"><img id="u" style="border-radius: 50%;float: left;width: 20%;"><div class="i"><span id="n" style="font-size: 28px;"></span></div><div class="i"><span id="p"></span><span id="r"></span><span id="w"></span></div><div class="i"><span id="f"></span></div><div class="i"><span id="b" style="margin-top: -16px;"></span><br></div></div><hr style="margin-top: 300px;opacity: 0.3;"><div class="P"></div></div><div class="S"></div></div><script>d = document;function q(i,c,l) {d.querySelector("#o").style.display = "block";d.querySelector("#mi").src = i;d.querySelector("#m").style.display = "block";d.querySelector("#c").innerHTML = c;d.querySelector("#l").innerHTML = l+' likes';window.onscroll = function(event) { d.querySelector("#m").style.display = "none"; d.querySelector("#o").style.display = "none";}}function s(){n = d.querySelector("#k");y = d.querySelector('#y');z = d.querySelector('#y').options[y.selectedIndex].value;x = new XMLHttpRequest();x.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {a = this.responseText;o = JSON.parse(a);for(var i=0;i<8;i++){d.querySelectorAll('.i span')[i].innerHTML = '';d.querySelector('.P').innerHTML = ''}if(z=='u'){o = o.graphql.user;p = o.profile_pic_url;n = o.username;v = o.edge_owner_to_timeline_media.count;r = o.edge_followed_by.count;w = o.edge_follow.count;f = o.full_name;b = o.biography;e = o.external_url;j = o.edge_owner_to_timeline_media.edges;if(e==null){e='';}d.querySelector('#f').innerHTML = `<b>${f}</b>`;d.querySelector('#r').innerHTML = `<b>${r}</b> followers`;d.querySelector('#w').innerHTML = `<b>${w}</b> following`;d.querySelector('#b').innerHTML = b+`<br><a href="${e}"><span class="span-info">${e}</span></a>`;}else{if(z=='h'){o = o.graphql.hashtag;n = o.name;k = o.edge_hashtag_to_media;v = k.count;j = k.edges}}p = o.profile_pic_url;d.querySelector('#u').src = p;d.querySelector('#n').innerHTML = n;d.querySelector('#p').innerHTML = `<b>${v}</b> posts`;pa = '';for (i=0;i<12;i++) {a = j[i].node;t = a.thumbnail_src;c = a.edge_media_to_caption.edges[0].node.text;l = a.edge_liked_by.count;pa = pa+`<img onclick="q('${t}','${c}','${l}');" style="cursor: pointer;float: left;width: 33%;margin-top: 20px;" src=${t}>`}d.querySelector('.P').innerHTML+=pa;y.value ='n'}};if(z=='u'){a = ''}else{if(z=='h'){a='explore/tags/'}}x.open("GET", `https://instagram.com/${a}${n.value}/?__a=1`);x.send()}</script></body>