Skip to content

Commit 179f687

Browse files
committed
remove outdated code
1 parent 2ee3b8c commit 179f687

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

docs/StardustDocs/cfg/resize-iframes.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
mutations.forEach((mutation) => {
1717
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
1818
const theme = htmlElement.classList.contains('theme-light') ? 'light' : 'dark';
19-
// console.log(theme)
2019
updateIframeThemes(theme);
2120
}
2221
});
@@ -54,28 +53,16 @@
5453
if (resize) {
5554
resize_iframe_out(el)
5655
}
57-
58-
// if (mutations[0].addedNodes.length || mutations[0].removedNodes.length) {
59-
60-
// }
6156
});
6257

6358
observer.observe(el.contentDocument.documentElement, {childList: true, subtree: true, characterData: true, attributes: true});
6459

6560
}
6661

6762
function observeIFrame(el) {
68-
// console.log("el.contentWindow: " + el.contentWindow)
69-
// console.log("el.contentWindow.document: " + el.contentWindow.document)
70-
// console.log("el.contentWindow.document.body: " + el.contentWindow.document.body)
71-
// console.log("el.contentWindow.performance: " + el.contentWindow.performance)
72-
// console.log("el.contentWindow.performance.timing.loadEventEnd: " + el.contentWindow.performance.timing.loadEventEnd)
73-
7463
if (el.contentWindow && el.contentWindow.performance && el.contentWindow.performance.timing.loadEventEnd === 0) {
75-
// console.log("ready path")
7664
el.addEventListener('load', () => doObserveIFrame(el), true)
7765
} else {
78-
// console.log("not ready path")
7966
doObserveIFrame(el)
8067
}
8168
}
@@ -90,9 +77,7 @@
9077
mutations.forEach(function (mutation) {
9178
for (let i = 0; i < mutation.addedNodes.length; i++) {
9279
let addedNode = mutation.addedNodes[i];
93-
// console.log(addedNode.tagName)
9480
if (addedNode.tagName === 'IFRAME') {
95-
// console.log("IFRAME loaded")
9681
observeIFrame(addedNode);
9782
} else if (addedNode.tagName === 'SECTION') {
9883
let iframes = [];

0 commit comments

Comments
 (0)