}
}
-function cache(url) {
- return url.replace('://', '://ne.edgecastcdn.net/8003A4/');
-}
-
var swap_, swap = function (on, off, time) {
setTimeout(swap_(on, off, time), time);
};
var idc = encodeURIComponent(id);
var name = package.name;
var icon = 'cydia://package-icon/' + idc;
+
var api = 'http://cydia.saurik.com/api/';
+ var capi = 'http://cache.cydia.saurik.com/api/';
+
+ var support = package.support;
var regarding = function (type) {
return encodeURIComponent("Cydia/APT(" + type + "): " + name);
$("#name").html(name);
space("#latest", package.latest, 96);
- $.xhr(cache(api + 'package/' + idc), 'GET', {}, null, {
+ $.xhr(capi + 'package/' + idc, 'GET', {}, null, {
success: function (value) {
value = eval(value);
+ if (typeof value.notice == "undefined")
+ $(".notice").addClass("deleted");
+ else
+ $("#notice-src").src(value.notice);
+
if (typeof value.rating == "undefined")
$(".rating").addClass("deleted");
else {
space("#author", author.name, 160);
if (author.address == null)
$("#author-icon").addClass("deleted");
- else {
- var support = package.support;
- if (support == null)
- $("#author-href").href("mailto:" + author.address + "?subject=" + regarding("A"));
- else
- $("#author-href").href(support);
- }
+ else if (support == null)
+ $("#author-href").href("mailto:" + author.address + "?subject=" + regarding("A"));
+ else
+ $("#author-href").href(support);
}
- //$("#notice-src").src("http://saurik.cachefly.net/notice/" + idc + ".html");
-
/*var store = commercial;
if (!store)
$(".activation").addClass("deleted");
space("#maintainer", maintainer.name, 153);
if (maintainer.address == null)
$("#maintainer-icon").addClass("deleted");
- else
+ else if (support == null)
$("#maintainer-href").href("mailto:" + maintainer.address + "?subject=" + regarding("M"));
+ else
+ $("#maintainer-href").href(support);
}
var sponsor = package.sponsor;
$("#thumb")[0].className = 'flip-180';
/* XXX: this could be better */
+ $("#rating-href").href(null);
$("#rating-none").css("display", "none");
$("#rating-done").css("display", "none");
+ var notice = $("#notice-src");
+
+ notice[0].outerHTML = '<iframe' +
+ ' class="notice"' +
+ ' id="notice-src"' +
+ ' frameborder="0"' +
+ ' width="320"' +
+ ' height="0"' +
+ ' target="_top"' +
+ '></iframe>';
+
var depiction = $("#depiction-src");
depiction[0].outerHTML = '<iframe' +