forked from HcwXd/better-medium-stats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
232 lines (228 loc) · 8.36 KB
/
popup.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<!--
This page is shown when the extension button is clicked, because the
"browser_action" field in manifest.json contains the "default_popup" key with
value "popup.html".
-->
<html>
<head>
<title>Better Medium Stats</title>
<link
href="https://fonts.googleapis.com/css?family=Chivo:400,700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="style.css" />
<script src="./dist/ga.js"></script>
</head>
<body>
<div class="title_wrap">
<div class="title">Better Medium Stats</div>
<div class="user_profile_wrap"></div>
</div>
<div class="nav_bar_wrap">
<div class="nav_item nav_item-active" data-name="summary">Summary</div>
<div class="nav_item" data-name="views">Views</div>
<div class="nav_item" data-name="stories">Stories</div>
<div class="nav_item" data-name="followers">Followers</div>
</div>
<div id="summary_container" class="container">
<div id="summary_loader" class="loader">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="summary_wrap">
<div class="metric_row key_metrics">
<div class="metric_wrap">
<div class="metric_label">Total Views</div>
<div class="metric_value total_views"></div>
</div>
<div class="metric_wrap" id="follower_count">
<div class="metric_label">Total Followers</div>
<div class="metric_value total_followers"></div>
</div>
</div>
<div class="metric_row view_metrics">
<div class="metric_wrap">
<div class="metric_label">Last 24 Hours</div>
<div class="metric_value day_views"></div>
</div>
<div class="metric_wrap">
<div class="metric_label">Last 7 Days</div>
<div class="metric_value week_views"></div>
</div>
<div class="metric_wrap">
<div class="metric_label">Last 30 Days</div>
<div class="metric_value month_views"></div>
</div>
</div>
<div class="summary_table"></div>
</div>
</div>
<div id="views_container" class="container">
<div class="format_btn_wrap time_format_btn_wrap">
<div data-timeFormat="year" class="format_btn time_format_btn">Year</div>
<div data-timeFormat="month" class="format_btn time_format_btn">Month</div>
<div data-timeFormat="week" class="format_btn time_format_btn">Week</div>
<div data-timeFormat="day" class="format_btn time_format_btn format_btn-select">Day</div>
<div data-timeFormat="hour" class="format_btn time_format_btn">Hour</div>
</div>
<div id="views_loader" class="loader">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<canvas id="viewsChart"></canvas>
<div class="change_time_btn_wrap">
<div class="change_time_btn backward_time_btn" data-direction="1"><<</div>
<div class="change_time_btn forward_time_btn change_time_btn-prohibit" data-direction="-1">
>>
</div>
<a class="download_btn_wrap views_download_wrap" title="Export to csv">
<div class="download_loader views_download_loader"></div>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="rgb(169, 169, 179)"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-download views_download"
>
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
</a>
</div>
</div>
<div id="stories_container" class="container">
<div class="format_btn_wrap stories_format_btn_wrap">
<div data-storiesFormat="views" class="format_btn stories_format_btn format_btn-select">
Views
</div>
<div data-storiesFormat="reads" class="format_btn stories_format_btn">Reads</div>
<div data-storiesFormat="r/v" class="format_btn stories_format_btn">R/V</div>
<div data-storiesFormat="claps" class="format_btn stories_format_btn">Claps</div>
<div data-storiesFormat="upvotes" class="format_btn stories_format_btn">Fans</div>
<div data-storiesFormat="c/f" class="format_btn stories_format_btn">C/F</div>
</div>
<div id="stories_loader" class="loader">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="stories_wrap"></div>
<canvas id="storiesChart"></canvas>
<a class="download_btn_wrap stories_download_wrap" title="Export to csv">
<div class="download_loader stories_download_loader"></div>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="rgb(169, 169, 179)"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-download stories_download"
>
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
</a>
</div>
<div id="followers_container" class="container">
<div id="followers_loader" class="loader">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="followers_wrap"></div>
<canvas id="followersChart"></canvas>
</div>
<div class="footer">
<div class="link_wrap">
<a
href="https://chrome.google.com/webstore/detail/medium-stats-counter/pdehepohihkkmeclfnlnipieffkomajc/reviews"
target="_blank"
rel="noopener"
title="Rate this Extension"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="rgb(169, 169, 179)"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-star"
>
<polygon
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
></polygon></svg
></a>
<a
href="https://docs.google.com/forms/d/e/1FAIpQLSfkgZcqw6NnjTbF5WI17wqWN96zd2ZGjuTFmCyfLXS3p0mn3Q/viewform"
target="_blank"
rel="noopener"
title="Feedback"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="rgb(169, 169, 179)"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-send"
>
<line x1="22" y1="2" x2="11" y2="13"></line>
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg
></a>
<a
href="https://github.com/HcwXd/better-medium-stats"
target="_blank"
rel="noopener"
title="Github"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="rgb(169, 169, 179)"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-github"
>
<path
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
></path></svg
></a>
</div>
<div class="version"></div>
</div>
</body>
<script src="constant.js"></script>
<script src="utils.js"></script>
<script src="dist/chart.js"></script>
<script src="popup.js"></script>
</html>