forked from koush/ROMManagerManifest
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rommanager.js
26 lines (25 loc) · 1.09 KB
/
rommanager.js
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
$(document).ready(function() {
$.getJSON("http://jsonp.deployfu.com/clean/" + encodeURIComponent("http://gh-pages.clockworkmod.com/ROMManagerManifest/devices.js") + "?callback=?",
function(data) {
var version = data.version;
var recovery_url = data.recovery_url;
var recovery_zip_url = data.recovery_zip_url;
var contents = "";
$.each(data.devices,
function(i, device) {
var v = version;
if (device.version != null && device.version > version) {
v = device.version;
}
var readonly_recovery = device.readonly_recovery;
var url = null;
if (readonly_recovery) {
url = sprintf(recovery_zip_url, v, device.key);
} else {
url = sprintf(recovery_url, v, device.key);
}
contents = contents + sprintf("<a href=\"%s\">%s</a><br/>", url, device.name);
});
$('.rommanagermanifest').html(contents);
});
});