summaryrefslogtreecommitdiff
path: root/Cydia.app
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-09-16 20:46:06 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:13:59 +0000
commit8cc8eb1ca0ee78a62a14187f1a45ee676d20ece8 (patch)
tree02f8a26f0a0f55fdc93c8b0c206adc437da06900 /Cydia.app
parent4eb59b62e96fcb850bd0f291a5e8f2f7c6bdcf3c (diff)
I hate you Apple, and your tiny little iframes, too.
Diffstat (limited to 'Cydia.app')
-rw-r--r--Cydia.app/package.html14
-rw-r--r--Cydia.app/package.js26
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_();