-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats.html
151 lines (151 loc) · 4.58 KB
/
stats.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html>
<head>
<title>Insta Stats</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
ul {
list-style: none;
float: left;
-moz-column-count: 6;
column-count: 6;
-webkit-column-width: 200px;
-moz-column-width: 200px;
column-width: 220px;
}
li {
display: flex;
flex-direction: row;
flex: 1;
margin: 10;
padding: 5px;
align-items: center;
align-content: center;
list-style-position: inside;
-weblink-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
a:link, a:visited, a:hover, a:active {
color: black;
text-decoration: none;
display: inline-block;
}
.thick {
font-weight: 600;
font-family: Arial;
font-size: 16px;
width: 150px;
word-wrap: break-word;
}
.light {
color: grey;
margin-top: -15px;
width: 150px;
word-wrap: break-word;
}
.left {
margin-left: 10px;
}
.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 17px;
}
.tab button:hover {
background-color: #ddd;
}
.tab button.active {
background-color: #ccc;
}
.tabcontent {
display: none;
justify-content: center;
align-items: center;
padding: 6px 12px;
border: 1px solid #ccc;
border-top: none;
}
div {
border-bottom: 1px solid rgba(0, 0, 0, 0);
}
a img {
border-radius: 50%;
border: 2px solid rgba(0, 0, 0, 0.1);
float: left;
}
</style>
</head>
<body>
<h2>Instagram Statistics Viewer</h2>
<div class="tab" id="tabbuttons">
<button class="tablinks" id="youFollowbutton" onclick="openTab(event, 'youFollow')">People who don't follow back</button>
<button class="tablinks" id="unfollowersbutton" onclick="openTab(event, 'unfollowers')">Recent unfollowers</button>
<button class="tablinks" id="theyFollowbutton" onclick="openTab(event, 'theyFollow')">You don't follow back</button>
</div>
<div id="init" class="tabcontent" style="flex-direction: column">
<img src="./assets/stats.png">
<H3 style="margin-top: -10px"> By <a href="https://github.com/mukheshpugal/" style="font-weight:600" target="__blank">mukheshpugal</a></H3>
<p>Loading...</p>
</div>
<div id="youFollow" class="tabcontent"><ul></ul></div>
<div id="unfollowers" class="tabcontent"><ul></ul></div>
<div id="theyFollow" class="tabcontent"><ul></ul></div>
<script type="text/javascript">document.getElementById("init").style.display = "flex";</script>
<script type="text/javascript" src="./files/infoDict.js"></script>
<script type="text/javascript" src="./files/youFollow.js"></script>
<script type="text/javascript" src="./files/unfollowers.js"></script>
<script type="text/javascript" src="./files/theyFollow.js"></script>
<script type="text/javascript">
function getList(list, name) {
for (let i = 0; i < list.length; i++) {
document.getElementById(name).children[0].innerHTML+=
"<li><a href=http://instagram.com/" +
list[i] + "/ target=__blank><img src=" +
infoDict[list[i]][1] + " alt=" +
infoDict[list[i]][0] +
" width=58px height=58px draggable=false/></a>" +
"<div class=left><a href=http://instagram.com/" +
list[i] + "/ target=__blank><p class=thick>" +
list[i] + "</p></a><p class=light>" +
infoDict[list[i]][0] + "</p></div></li>";
}
document.getElementById(name + "button").innerHTML += " (" + list.length + ")";
}
getList(youFollow, "youFollow");
getList(unfollowers, "unfollowers");
getList(theyFollow, "theyFollow");
</script>
<script type="text/javascript">
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "flex";
evt.currentTarget.className += " active";
}
</script>
<script type="text/javascript">document.getElementById("init").children[2].innerHTML = "Click on the tabs to access data"</script>
</body>
</html>