blob: 138156c0d96e1f272a524fc0f9fb055c961caa87 [file] [log] [blame]
<html>
<!--
This is a helper to assist with resizing the iframe on buildbots.html.
This is a workaround for the same origin policy, which prevents pages from
communicating across domains. For more information, see:
http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content
-->
<head>
<script language="JavaScript">
function resizeGrandparent() {
// Parse the variables in the URL.
var args = [];
var dict = window.location.search.slice(1).split('&');
for(var i = 0; i < dict.length; i++) {
var split = dict[i].split('=');
args.push(split[0]);
args[split[0]] = split[1];
}
// Verify that "width" and "height" are defined.
if (!("width" in args && "height" in args)) {
return;
}
// Resize our grandparent's iframe.
parent.parent.resizeIframe(args.width, args.height);
}
</script>
</head>
<body onload="resizeGrandparent();"></body>
</html>