excuse me for my english
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
excuse me for my english
I am having the same issues on both:
Mac - 5.0.342.1
Win - 5.0.342.2
sample popup.html:
-------- 8< ---------------- 8< ---------------- 8< ----------------
8< --------
<html>
<head>
<script type="text/javascript">
function switchView(id, resizeBody) {
var views = document.getElementsByTagName("div");
var effectiveHeight = 0;
for (var i=0; i<views.length; i++) {
if (views[i].id == id) {
console.log(">>> showing: " + views[i].id);
views[i].style.display = "";
console.log(">>> " + views[i].style.height);
effectiveHeight += parseInt(views[i].style.height);
} else {
console.log(">>> Hiding: " + views[i].id);
views[i].style.display = "none"
}
}
if (resizeBody) {
document.body.style.height = effectiveHeight + "px";
}
}
</script>
</head>
<body style="width: 400px; margin: 5px; padding: 0px; border: 1px
solid black;">
<div id="alpha" style="height: 200px; border: 1px dashed green;">
<h2>I am 200px high</h2>
<a href="javascript:switchView('beta');">See another</a><br/>
<a href="javascript:switchView('beta', true);">See another and
resize BODY</a>
</div>
<div id="beta" style="height: 300px; border: 1px dashed red;
display: none;">
<h2>I am 300px high</h2>
<a href="javascript:switchView('alpha');">See another</a><br/>
<a href="javascript:switchView('alpha', true);">See another and
resize BODY</a>
</div>
</body>
</html>
-------- 8< ---------------- 8< ---------------- 8< ----------------
8< --------
There are two links - one simply switched the visibility of the two
divs and the other would also adjust the height of the body. Divs are
dashed and body is solid border... for comparison purposes. Neither of
the methods make the popup reduce in height...
It would be very nice if the popup would shrink...
You need to add
<!DOCTYPE html>
to the beginning of your popup code.
On Mar 4, 10:07 am, "italianshare_m...@thisisnotmyrealemail.com"