forked from quannadev/fixme.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
265 lines (240 loc) · 8.52 KB
/
Copy pathindex.html
File metadata and controls
265 lines (240 loc) · 8.52 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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html>
<head>
<title>Bon Thối ydia</title>
<!--<meta property="fb:app_id" content="601357674038185">-->
<meta property="og:title" content="bonthoi">
<meta property="og:image" content="https://bonthoi.com/CydiaIcon.png">
<meta property="og:url" content="https://bonthoi.com">
<meta property="og:site_name" content="Bon Thối Repo"/>
<meta property="og:description"
content="Repo Cydia by Bon Thối. It also contains many useful jailbreak and programming tools."/>
<meta property="description"
content="Repo Cydia by Bon Thối. It also contains many useful jailbreak and programming tools."/>
<meta name="description"
content="Repo Cydia by Bon Thối. It also contains many useful jailbreak and programming tools."/>
<meta name="keywords" content="Jailbreak, bonthoi, repo, tools, hacker"/>
<meta property="article:tag"
content="Repo Cydia by Bon Thối. It also contains many useful jailbreak and programming tools."/>
<meta property="og:type" content="website">
<meta name="google-site-verification" content="Z7kUu6LzKOt6CKFCyPWLakCIkqY2JDchbYFSzYVKIYo"/>
<script src=./my.js></script>
<link rel=stylesheet href=/lib/bootstrap.min.css></link>
<link rel=stylesheet href=main.css></link>
<link rel=stylesheet href=/css/apply.css></link>
<link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css></link>
<meta name=viewport content='width=device-width, initial-scale=1.0, user-scalable=no'/>
</head>
<body class="mt-0">
<div id=header-page></div>
<script>
my("#header-page").load("/header.template", function () {
my("#menu-header").find("#home").addClass("active")
if (localStorage.getItem("theme") === "dark")
my("#menu-header")
.removeClass("navbar-light bg-light")
.addClass("navbar-dark bg-dark")
})
function toggleThemeMenu() {
my("#menu-header")
.toggleClass("navbar-light bg-light navbar-dark bg-dark")
}
</script>
<div class=container>
<div id="open-cydia" class="row mt-3">
<div class=col>
<h6 class="text-uppercase text-secondary">Bon Thối Cydia</h6>
<ul class="bg-white">
<li>
<a id="open-cydia-url"
href="cydia://url/https://cydia.saurik.com/api/share#?source=https://bonthoi.com/">
<img src="icons/cydia7.png" class="icon_"/>
<label>Open Cydia</label>
</a>
</li>
</ul>
<p class="small text-center text-secondary">Repo: https://bonthoi.com/</p>
</div>
</div>
<div class="row">
<div class=col>
<h6 class="text-uppercase text-secondary">Package updates</h6>
<ul class="bg-white mb-0" id="last_update">
</ul>
<button id=more-tweak-update class="float-right no-app border-0 mt-2 mb-1">
<i class="icon-more"></i>
<label>More</label>
</button>
</div>
</div>
<div class="row">
<div class=col>
<h6 class="text-uppercase text-secondary">Browser packages</h6>
<ul class="bg-white mb-0" id="browser-pkg">
</ul>
<button id=more-browser-pkg class="float-right no-app border-0 mt-2 mb-1">
<i class="icon-more"></i>
<label>More</label>
</button>
</div>
</div>
<div class="row">
<div class=col>
<p class="small text-center text-secondary">
Bon Thối © 2020
</p>
</div>
</div>
</div>
<style type=text/css>
</style>
<script>
var json = JSON.parse(my.getText("./all.pkgs")).sort(function (a, b) {
return b.Time - a.Time
})
var $start = 0;
my("#more-tweak-update")
.click(function () {
$start += 5
loadRecentUpdates($start)
})
loadRecentUpdates($start)
function loadRecentUpdates($s) {
var htmlnews = "";
var count = $s, leng = json.length, tmp
for (; count < $s + 5 && count < leng; count++) {
if (my.isEmptyObject(json[count])) continue;
var urlOpen = "cydia://package/" + json[count].Package
if (navigator.userAgent.search(/Cydia/) === -1)
urlOpen = location.protocol + "//" + location.hostname + "/description.html?goto=" + json[count].Package;
tmp = encodeURI(
json[count].Section ?
json[count].Section :
"unknown"
)
htmlnews += "\
<li>\
<p>\
<a href='" + urlOpen + "' target=_blank>\
<img class=icon_ src=./icons/" + tmp + ".png />\
<label>" + json[count].Name + " ~ v" + json[count].Version + "</label>\
</a>\
</p>\
</li>"
}
my("#last_update")
.html(function (e) {
return e + htmlnews
})
if (count >= leng)
my("#more-tweak-update").css("opacity", 0.5);
}
loadListType()
function loadListType($html) {
my("#more-browser-pkg").unAttr("hidden")
my("#browser-pkg").addClass("mb-0")
var ls = []
json.forEach(function (e) {
if (my.isEmptyObj(e))
return;
if (!ls.some(function (f) {
if (f.type === e.Section)
return f.pkg.push(e), true
})) ls.push({
type: e.Section,
pkg: [e]
})
})
ls = ls.sort(function (a, b) {
return (a.type || '').charCodeAt(0) - (b.type || '').charCodeAt(0)
})
var $s = (my("#browser-pkg").data("count") || 0) - 0
var i = $s, length = ls.length
var tmp;
if ($html === undefined)
$html = "";
for (; i < length && i < $s + 5; i++) {
tmp = encodeURI(
ls[i].type ?
ls[i].type :
"unknown"
)
$html += "\
<li>\
<p>\
<button class=\"no-app border-0\" onclick=loadInfoPkg(this) data-name=" + tmp + " data-pkg=\"" + encodeURIComponent(JSON.stringify(ls[i].pkg)) + "\">\
<img class=icon_ src=icons/" + tmp + ".png />\
<label>" + decodeURIComponent(tmp) + " (" + ls[i].pkg.length + ")" + "</label>\
</button>\
</p>\
</li>"
}
my("#browser-pkg").html($html)
my("#more-browser-pkg")
.css("opacity", 1)
if (i >= length)
my("#more-browser-pkg")
.css("opacity", .5)
}
my("#more-browser-pkg")
.click(function () {
my("#browser-pkg")
.data("count", function (e) {
return (e || 0) - 0 + 5
})
loadListType(
my("#browser-pkg").html()
)
})
function loadInfoPkg(e) {
my("#browser-pkg")
.removeClass("mb-0")
.data("count", 0)
my("#more-browser-pkg").attr("hidden", true)
var json = JSON.parse(
decodeURIComponent(
my(e).data("pkg")
)
), $html = "\
<li>\
<p>\
<button class=\"no-app border-0\" onclick=loadListType()>\
<img class=icon_ src=icons/back.png />\
<label>Back</label>\
</button>\
</p>\
</li>";
json.forEach(function (e) {
var urlOpen = "cydia://package/" + e.Package
if (navigator.userAgent.search(/Cydia/) === -1)
urlOpen = location.protocol + "//" + location.hostname + "/description.html?goto=" + e.Package;
tmp = encodeURI(
e.Section ?
e.Section :
"unknown"
)
$html += "\
<li>\
<p>\
<a href=" + urlOpen + " target=_blank>\
<img class=icon_ src=icons/" + tmp + ".png />\
<label>" + e.Name + " - " + e.Version + "</label>\
</a>\
</p>\
</li>"
})
my("#browser-pkg").html($html)
}
if (localStorage.getItem("theme") === "dark")
my("<link rel=stylesheet href=m-dark.css id=theme-dark></link>").appendTo("head");
function themeToggle() {
var theme
if (my("#theme-dark")[0])
my("#theme-dark").remove(), theme = "light"
else my("<link rel=stylesheet href=m-dark.css id=theme-dark></link>").appendTo("head"), theme = "dark"
toggleThemeMenu()
localStorage.setItem("theme", theme)
}
</script>
</body>
</html>