-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathreleases.html
More file actions
139 lines (136 loc) · 6.29 KB
/
releases.html
File metadata and controls
139 lines (136 loc) · 6.29 KB
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
<html>
<head>
<title>Manga View Android</title>
<meta name="description" content="마나토끼 안드로이드 뷰어 - 릴리즈">
<meta name="author" content="junheah">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="web/favicon.png">
<link rel="stylesheet" type="text/css" href="web/style.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-48545626-3"></script>
<script data-ad-client="ca-pub-1967308958954015" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-48545626-3');
</script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@1.0/nanumsquare.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://momentjs.com/downloads/moment.js"></script>
<script>
var downloadlink = "";
var releaselink = "";
var page=0;
var last=false;
var totalDownloadCount = 0;
function GetReleases() {
if(!last){
++page;
$.getJSON("https://api.github.com/repos/junheah/MangaViewAndroid/releases?page="+page).done(function (json) {
previousUpdatedAt = moment();
if(json.length<30) last = true;
for (var i = 0; i < json.length; i++) {
var release = json[i];
if (release.assets.length === 0) {
continue;
}
var asset = release.assets[0];
var fileSize = Math.round(asset.size / 1024);
var downloadCount = 0;
for (var i2 = 0; i2 < release.assets.length; i2++) {
downloadCount += release.assets[i2].download_count;
}
totalDownloadCount += downloadCount;
var updatedAt = moment(asset.updated_at);
previousUpdatedAt = updatedAt;
$(".table-downloads tbody")
.append($("<tr>")
.append($("<td>")
.append($("<a>")
.attr("href", release.html_url)
.text(release.tag_name)
)
.append(release.prerelease ? "<div class=\"float-right\"><span class=\"badge badge-danger\">Pre-release</span></div>" : "")
)
.append($("<td>")
.text(fileSize.toLocaleString() + " KB")
)
.append($("<td>")
.text(downloadCount.toLocaleString())
)
.append($("<td>")
.text(moment(asset.updated_at).format("YYYY-MM-DD HH:mm"))
)
.append($("<td>")
.append($("<button>")
.attr("onclick", "location.href='"+asset.browser_download_url+"';")
.text("다운로드")
)
)
);
}
$("table-downloads").fadeIn();
if(last) document.getElementById("more").style.display = "none";
else document.getElementById("more").disabled = false;
console.log(totalDownloadCount);
});
}
}
function GetParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)");
var results = regex.exec(url);
if (!results) return null;
if (!results[2]) return "";
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
window.onload = function() {
setTimeout(function (){
$("div.title").fadeIn('slow');
$("div.content").fadeIn('slow');
$("div.footer").fadeIn('slow');
GetReleases();
}, 800);
}
</script>
</head>
<body>
<div class="header" onclick="location.href = 'index.html';">
<img style="width:100%;max-width:31.5em;padding-top:120px;padding-bottom:80px" src="web/logo.svg"/>
<br>
<div class="title" style="display:none;">
<h1> Manga View Android </h1>
<p> 마나토끼 안드로이드 뷰어 </p>
</div>
<br>
</div>
<div class="content" style="display:none;">
<h1> 모든 릴리즈 </h1>
<br>
<!-- put body content here -->
<table class="table-downloads">
<thead>
<tr>
<th>버전 코드</th>
<th>크기</th>
<th>다운로드 횟수</th>
<th>게시 날짜</th>
<th>-</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<center>
<button style="margin-top:20px;" id="more" disabled="true" onclick="GetReleases(); this.disabled=true;">더보기</button>
</center>
</div>
<div class="footer" style="display:none;">
<!-- footer -->
<p style="display:inline-block;">powered by</p><a style="display:inline-block;" href="https://github.com/">Github</a>
</div>
</body>
</html>