diff options
Diffstat (limited to 'Cydia.app')
-rw-r--r-- | Cydia.app/package.html | 14 | ||||
-rw-r--r-- | Cydia.app/package.js | 26 |
2 files changed, 37 insertions, 3 deletions
diff --git a/Cydia.app/package.html b/Cydia.app/package.html index 317f41b..5bd2f4c 100644 --- a/Cydia.app/package.html +++ b/Cydia.app/package.html @@ -9,6 +9,20 @@ <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() { diff --git a/Cydia.app/package.js b/Cydia.app/package.js index 104bd8c..6ec06cf 100644 --- a/Cydia.app/package.js +++ b/Cydia.app/package.js @@ -78,7 +78,16 @@ var special_ = function () { if (typeof value.notice == "undefined") $(".notice").addClass("deleted"); else - $("#notice-src").src(value.notice); + $("#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>'; if (typeof value.rating == "undefined") $(".rating").addClass("deleted"); @@ -201,7 +210,17 @@ var special_ = function () { $(".depiction").addClass("deleted"); else { $(".description").addClass("deleted"); - $("#depiction-src").src(depiction); + + $("#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; @@ -308,6 +327,7 @@ var special = function () { ' width="320"' + ' height="0"' + ' target="_top"' + + ' onload="onframe(' + "'notice-src', 'notice'" + ')"' + '></iframe>'; var depiction = $("#depiction-src"); @@ -319,7 +339,7 @@ var special = function () { ' width="320"' + ' height="0"' + ' target="_top"' + - ' onload_="loaded()"' + + ' onload="onframe(' + "'depiction-src', 'depiction'" + ')"' + '></iframe>'; special_(); |