]> git.saurik.com Git - cydia.git/blobdiff - Cydia.app/package.js
Don't bother updating data if we aren't actually, like, changing anything.
[cydia.git] / Cydia.app / package.js
index 6ec06cf1c7a8d50f0f751f65bbd103bfef939959..6e091cf29f28bccd4377787c0e5adfb4d6c773fd 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");
@@ -210,17 +199,7 @@ var special_ = function () {
         $(".depiction").addClass("deleted");
     else {
         $(".description").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>';
+        $("#depiction-src").src(depiction);
     }
 
     var description = package.longDescription;
@@ -327,7 +306,6 @@ var special = function () {
         ' width="320"' +
         ' height="0"' +
         ' target="_top"' +
-        ' onload="onframe(' + "'notice-src', 'notice'" + ')"' +
     '></iframe>';
 
     var depiction = $("#depiction-src");
@@ -339,7 +317,7 @@ var special = function () {
         ' width="320"' +
         ' height="0"' +
         ' target="_top"' +
-        ' onload="onframe(' + "'depiction-src', 'depiction'" + ')"' +
+        ' onload_="loaded()"' +
     '></iframe>';
 
     special_();