]> git.saurik.com Git - cydia.git/commitdiff
Committing final workaround for the tiny iframe of doom problem.
authorJay Freeman (saurik) <saurik@saurk.com>
Wed, 17 Mar 2010 07:47:44 +0000 (07:47 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:13:59 +0000 (07:13 +0000)
Cydia.app/package.html
Cydia.app/package.js

index 5bd2f4c6e6c296e77a36890dbd1c678ca888b507..7a7370198d4ed99ce478659ad262b8e13cbe32ae 100644 (file)
@@ -9,20 +9,6 @@
     <script type="text/javascript" src="localize.js"></script>
     <base target="_blank"/>
 
-<script type="text/javascript">
-    var onframe = function(id, name) {
-        var node = document.getElementById(id);
-        var frame = window.frames[name];
-
-            try {
-                node.height = frame.document.body.scrollHeight;
-            } catch (e) {
-                node.height = 370;
-                node.width = 320;
-            }
-    };
-</script>
-
     <!--script type="text/javascript">
         var count = -1;
         var loaded = function() {
         #rating-done {
             display: none;
         }
+
+        #depiction-src,
+        #notice-src {
+            height: 1px;
+            width: 320px;
+        }
     </style>
 </head><body class="pinstripe">
 <dialog><panel>
index 6ec06cf1c7a8d50f0f751f65bbd103bfef939959..104bd8c6826273a52b57ccdf33142ec648152d3a 100644 (file)
@@ -78,16 +78,7 @@ var special_ = function () {
             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 +201,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 +308,6 @@ var special = function () {
         ' width="320"' +
         ' height="0"' +
         ' target="_top"' +
-        ' onload="onframe(' + "'notice-src', 'notice'" + ')"' +
     '></iframe>';
 
     var depiction = $("#depiction-src");
@@ -339,7 +319,7 @@ var special = function () {
         ' width="320"' +
         ' height="0"' +
         ' target="_top"' +
-        ' onload="onframe(' + "'depiction-src', 'depiction'" + ')"' +
+        ' onload_="loaded()"' +
     '></iframe>';
 
     special_();