1
0
mirror of https://github.com/minio/docs.git synced 2025-07-27 08:41:57 +03:00

Hide navigation links when loaded inside iframe

This commit is contained in:
Rushan
2022-03-25 17:10:14 +04:00
committed by Ravind Kumar
parent b824e36e65
commit c84dcc74d4
2 changed files with 24 additions and 0 deletions

View File

@ -1,4 +1,11 @@
window.addEventListener("DOMContentLoaded", (event) => {
// Detect parent iframe.
// This is required to hide the navigation links when viewed via PathFactory for analytics purposes
if (window.location !== window.parent.location) {
document.body.classList.add('inside-iframe');
}
// Table of contents
var topic = document.getElementById("table-of-contents");
if (topic != null) {
document