]>
git.saurik.com Git - cydia.git/blob - Cydia.app/package.js
52025a94a3997e56541cb8e8fe1f81db4ed43111
2 "name": "MobileTerminal",
5 "name": "Allen Porter",
6 "address": "allen.porter@gmail.com"
8 //"depiction": "http://planet-iphones.com/repository/info/chromium1.3.php",
9 "depiction": "http://cydia.saurik.com/terminal.html",
10 "description": "this is a sample description",
11 "homepage": "http://cydia.saurik.com/terminal.html",
12 "installed": "286u-4",
13 "id": "mobileterminal",
14 "section": "Terminal Support",
17 "name": "Jay Freeman",
18 "address": "saurik@saurik.com"
21 "name": "Telesphoreo Tangelo",
22 "description": "Distribution of Unix Software for the iPhone"
28 var idc
= encodeURIComponent(id
);
29 var name
= package.name
;
30 var regarding
= encodeURIComponent("Cydia/APT: " + name
);
32 $("#icon").src("cydia://package-icon/" + idc
);
33 $("#name").html(name
);
34 $("#latest").html(package.latest
);
36 var warnings
= package.warnings
;
37 var length
= warnings
== null ? 0 : warnings
.length
;
39 $(".warnings").remove();
41 var parent
= $("#warnings");
42 var child
= $("#warning");
45 for (var i
= 0; i
!= length
; ++i
) {
46 var clone
= child
.clone(true);
48 clone
.xpath("label").html($.xml(warnings
[i
]));
52 var applications
= package.applications
;
53 var length
= applications
== null ? 0 : applications
.length
;
55 $(".applications").remove();
57 var parent
= $("#actions");
58 var child
= $("#application");
61 for (var i
= 0; i
!= length
; ++i
) {
62 var application
= applications
[i
];
63 var clone
= child
.clone(true);
65 clone
.href("cydia://launch/" + application
[0]);
66 clone
.xpath("label").html("Run " + $.xml(application
[1]));
67 clone
.xpath("img").src(application
[2]);
72 var author
= package.author
;
74 $(".author").remove();
76 $("#author").html(author
.name
);
77 if (author
.address
== null)
78 $("#author-icon").remove();
80 $("#author-href").href("mailto:" + author
.address
+ "?subject=" + regarding
);
83 //$("#notice-src").src("http://saurik.cachefly.net/notice/" + idc + ".html");
85 var depiction
= package.depiction
;
86 if (depiction
== null)
87 $(".depiction").remove();
89 $(".description").display("none");
90 $("#depiction-src").src(depiction
);
93 var description
= package.description
;
94 if (description
== null)
95 description
= package.tagline
;
97 description
= description
.replace(/\n/g, "<br/>");
98 $("#description").html(description
);
100 var homepage
= package.homepage
;
101 if (homepage
== null)
102 $(".homepage").remove();
104 $("#homepage-href").href(homepage
);
106 var installed
= package.installed
;
107 if (installed
== null)
108 $(".installed").remove();
110 $("#installed").html(installed
);
111 $("#files-href").href("cydia://files/" + idc
);
116 var section
= package.section
;
118 $(".section").remove();
120 $("#section").html(package.section
);
122 var size
= package.size
;
126 $("#size").html(size
/ 1024 + " kB");
128 var maintainer
= package.maintainer
;
129 if (maintainer
== null)
130 $(".maintainer").remove();
132 $("#maintainer").html(maintainer
.name
);
133 if (maintainer
.address
== null)
134 $("#maintainer-icon").remove();
136 $("#maintainer-href").href("mailto:" + maintainer
.address
+ "?subject=" + regarding
);
139 var sponsor
= package.sponsor
;
141 $(".sponsor").remove();
143 $("#sponsor").html(sponsor
.name
);
144 $("#sponsor-href").href(sponsor
.address
);
147 var source
= package.source
;
148 if (source
== null) {
149 $(".source").remove();
150 $(".trusted").remove();
152 $("#source-name").html(source
.name
);
155 $(".trusted").remove();
157 var description
= source
.description
;
158 if (description
== null)
159 $(".source-description").remove();
161 $("#source-description").html(description
);