Skip to content

Commit 19e49cc

Browse files
Update index.html
1 parent a336cdc commit 19e49cc

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

index.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
4242
});
4343
</script>
44+
<script>
45+
window.addEventListener("message", (event) => {
46+
if (event.data.type === "resize" && event.data.height) {
47+
const iframe = document.getElementById("chat-iframe");
48+
iframe.style.height = event.data.height + "px";
49+
}
50+
});
51+
</script>
4452
<script>
4553
function toggleChatbox() {
4654
const box = document.getElementById("chatbox");
@@ -230,9 +238,12 @@ <h1>Hariprashad Ravikumar</h1>
230238
<span>HariBot AI 🤖</span>
231239
<button onclick="toggleChatbox()"></button>
232240
</div>
233-
<iframe src="https://hari-chatbot.onrender.com"
234-
width="100%" height="100%" frameborder="0"
235-
title="HariBot Assistant"></iframe>
241+
<iframe id="chat-iframe"
242+
src="https://hari-chatbot.onrender.com"
243+
frameborder="0"
244+
title="HariBot Assistant"
245+
style="width: 100%; border: none;"></iframe>
246+
236247
</div>
237248

238249
<footer>

0 commit comments

Comments
 (0)