Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
SecurityBagel authored Oct 30, 2024
1 parent 7bdfd0a commit 7cf120b
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,51 @@
<head>
<title>Power BI Report</title>
<style>
/* Ensure the iframe takes up the full viewport */
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

#fullscreenButton {
padding: 10px 20px;
font-size: 16px;
margin-bottom: 10px;
cursor: pointer;
}

iframe {
width: 100%;
height: 100%;
height: 90vh; /* Almost full screen without entering fullscreen mode */
border: none;
}
</style>
</head>
<body>
<button id="fullscreenButton">View Full Screen</button>
<iframe title="CMMC Bagel Lite (Demo)" src="https://app.powerbi.com/view?r=eyJrIjoiYjA5NmQ1ZDMtYjRkNi00ODE3LWE5N2QtMzBkYjRlM2M4M2JkIiwidCI6IjJiMDc4ODQ4LWM0M2UtNDVmMS04MzdlLTUyODBhMjVhNzZlZiIsImMiOjN9" allowfullscreen="true"></iframe>

<script>
document.getElementById("fullscreenButton").onclick = function() {
var iframe = document.querySelector("iframe");
if (iframe.requestFullscreen) {
iframe.requestFullscreen();
} else if (iframe.mozRequestFullScreen) { /* Firefox */
iframe.mozRequestFullScreen();
} else if (iframe.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
iframe.webkitRequestFullscreen();
} else if (iframe.msRequestFullscreen) { /* IE/Edge */
iframe.msRequestFullscreen();
}
};
</script>
</body>
</html>


0 comments on commit 7cf120b

Please sign in to comment.