Select Git revision
-
Jens Bendisposto authoredJens Bendisposto authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
chatbox.html 1.44 KiB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HHU Search Helper - Inner</title>
<link rel="stylesheet" href="styles.css">
<style>
body {
overflow: hidden;
}
</style>
</head>
<body>
<div id="chatbox">
<div id="chatbox-title">HHU Search Helper</div>
<div id="messages"></div>
<div id="input-container">
<input type="text" id="user-input" placeholder="Try searching: 'minimum admission grade' or 'I'm from outside the EU'">
<button onclick="saveMessage()">Save</button>
</div>
</div>
<script>
/** make iframes grow and informs about growth */
function adjustIframeSize() {
if (window.frameElement) {
window.frameElement.style.height = document.documentElement.scrollHeight + 'px';
}
}
window.addEventListener('load', adjustIframeSize);
const observers = new MutationObserver(adjustIframeSize);
observers.observe(document.body, { childList: true, subtree: true });
function notifyParentOfResize() {
if (window.parent && window.parent.adjustIframeSize) {
window.parent.adjustIframeSize();
}
}
window.addEventListener('load', notifyParentOfResize);
const observer = new MutationObserver(notifyParentOfResize);
observer.observe(document.body, {
childList: true,
subtree: true,
attributes: true
});
</script>
<script type="module" src="index.js" async></script>
</body>
</html>