Skip to content
Snippets Groups Projects
Commit ff2559f6 authored by Zhefu Li's avatar Zhefu Li
Browse files

Update attributions.html

parent d9814c82
No related branches found
No related tags found
No related merge requests found
......@@ -47,23 +47,23 @@
<div class="row mt-4">
<div class="col-lg-12">
<script type="text/javascript">
window.onload = function () {
var iframe = document.getElementById('igem-attribution-form');
iframe.onload = function () {
try {
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height;
} catch (ex) { }
};
};
</script>
<iframe style="width: 100%; height: 7000px;" id="igem-attribution-form" src="https://teams.igem.org/wiki/5187/attributions"></iframe>
<iframe style="width: 100%;" id="igem-attribution-form"
src="https://teams.igem.org/wiki/5187/attributions"></iframe>
</iframe>
</div>
</div>
<script type="text/javascript">
// Listen to size change and update form height
window.addEventListener("message", function (e) {
if (e.origin === "https://teams.igem.org") {
const { type, data } = JSON.parse(e.data);
if (type === "igem-attribution-form") {
const element = document.getElementById("igem-attribution-form");
element.style.height = `${data + 50}px`;
}
}
});
</script>
</div>
</body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment