Skip to content

Instantly share code, notes, and snippets.

@svenk
Last active January 14, 2025 13:04
Show Gist options
  • Save svenk/39f1989d12c6be980649d75b0d17daea to your computer and use it in GitHub Desktop.
Save svenk/39f1989d12c6be980649d75b0d17daea to your computer and use it in GitHub Desktop.
Embed Personio in an iframe on your website
<!doctype html>
<html>
<style>
iframe {
width:100%;
border: none;
min-height: 1vh; /* is set by javascript anyway */
}
</style>
<script>
window.addEventListener('message', function(e) {
var iframe = document.querySelector('#personio-iframe');
var eventName = e.data[0];
var data = e.data[1];
switch(eventName) {
case 'setHeight':
iframe.style.height = data + 'px';
window.scrollTo({ top: 0, behavior: 'smooth' });
break;
}
}, false);
</script>
<h1>Iframe Einbundung Personio Test</h1>
<iframe id="personio-iframe" src="https://mycompany.jobs.personio.de/"></iframe>

Einbettung von Personio als iFrame in Unternehmenswebsite

Personio erlaubt nicht die Anpassung des Hostings des Bewerberportals, sodass man immer https://mycompany.jobs.personio.de/ bekommt und nicht sowas wie https://jobs.mycompany.de einstellen kann.

Die Cross Site Scripting-Header verbietet ferner Scriptingzugriff beim Einbetten als iFRAME.

Allerdings gibt es einen Trick: Window Message Events. Das ganze habe ich so in einer anderen Unternehmensseite gesehen und extrahiert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment