]> git.saurik.com Git - cydia.git/blobdiff - Cydia.app/package.js
Fix kSCNetworkReachabilityFlagsConnectionOn* flags for 2.0 toolchain.
[cydia.git] / Cydia.app / package.js
index 6ec06cf1c7a8d50f0f751f65bbd103bfef939959..b9f85ff0692b225059ee34cc6cf2e6a43adc48d1 100644 (file)
@@ -33,10 +33,6 @@ function space(selector, html, max) {
     }
 }
 
-function cache(url) {
-    return url.replace('://', '://ne.edgecastcdn.net/8003A4/');
-}
-
 var swap_, swap = function (on, off, time) {
     setTimeout(swap_(on, off, time), time);
 };
@@ -57,7 +53,9 @@ var special_ = function () {
     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;
 
@@ -71,23 +69,14 @@ var special_ = function () {
     $("#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")[0].outerHTML = '<iframe' +
-                    ' class="notice"' +
-                    ' id="notice-src"' +
-                    ' frameborder="0"' +
-                    ' width="320"' +
-                    ' height="0"' +
-                    ' target="_top"' +
-                    ' src="' + $.xml(value.notice) + '"' +
-                    ' onload="onframe(' + "'notice-src', 'notice'" + ')"' +
-                '></iframe>';
+                $("#notice-src").src(value.notice);
 
             if (typeof value.rating == "undefined")
                 $(".rating").addClass("deleted");
@@ -206,29 +195,23 @@ var special_ = function () {
     }*/
 
     var depiction = package.depiction;
-    if (depiction == null)
-        $(".depiction").addClass("deleted");
-    else {
+    if (depiction != null) {
         $(".description").addClass("deleted");
+        $("#depiction-src").src(depiction);
+    } else {
+        $(".depiction").addClass("deleted");
 
-        $("#depiction-src")[0].outerHTML = '<iframe' +
-            ' class="depiction"' +
-            ' id="depiction-src"' +
-            ' frameborder="0"' +
-            ' width="320"' +
-            ' height="0"' +
-            ' target="_top"' +
-            ' src="' + $.xml(depiction) + '"' +
-            ' onload="onframe(' + "'depiction-src', 'depiction'" + ')"' +
-        '></iframe>';
-    }
+        var description = package.longDescription;
+        if (description == null)
+            description = package.shortDescription;
 
-    var description = package.longDescription;
-    if (description == null)
-        description = package.shortDescription;
-    else
-        description = description.replace(/\n/g, "<br/>");
-    $("#description").html(description);
+        if (description == null)
+            $(".description").addClass("deleted");
+        else {
+            description = $.xml(description).replace(/\n/g, "<br/>");
+            $("#description").html(description);
+        }
+    }
 
     var homepage = package.homepage;
     if (homepage == null)
@@ -300,7 +283,7 @@ var special_ = function () {
         if (description == null)
             $(".source-description").addClass("deleted");
         else
-            $("#source-description").html(description);
+            $("#source-description").html($.xml(description));
     }
 };
 
@@ -327,7 +310,6 @@ var special = function () {
         ' width="320"' +
         ' height="0"' +
         ' target="_top"' +
-        ' onload="onframe(' + "'notice-src', 'notice'" + ')"' +
     '></iframe>';
 
     var depiction = $("#depiction-src");
@@ -339,7 +321,7 @@ var special = function () {
         ' width="320"' +
         ' height="0"' +
         ' target="_top"' +
-        ' onload="onframe(' + "'depiction-src', 'depiction'" + ')"' +
+        ' onload_="loaded()"' +
     '></iframe>';
 
     special_();