Skip to content

Commit 850ce7c

Browse files
MaxGhenisclaude
andcommitted
Add iframe detection warning
Pages like maxghenis.com/mita/ wrap content in cross-origin iframes, which prevents scrolling. Now we detect this and log a warning with the iframe's src URL so users can navigate directly to the content. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b8f451a commit 850ce7c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

background.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ async function injectScrollScript(tabId, duration) {
5454
func: (scrollDuration, overrideCSS, overrideId, minThreshold) => {
5555
console.log('[Scrollywood] Scroll script injected, duration:', scrollDuration);
5656

57+
// Check for iframe-wrapped content (common cause of scroll issues)
58+
const iframes = document.querySelectorAll('iframe');
59+
if (iframes.length > 0 && document.body.children.length <= 2) {
60+
console.warn('[Scrollywood] Page appears to be iframe-wrapped. Content inside cross-origin iframes cannot be scrolled. Try navigating directly to:', iframes[0]?.src);
61+
}
62+
5763
// Override CSS scroll-behavior to prevent conflicts with programmatic scrolling
5864
const styleOverride = document.createElement('style');
5965
styleOverride.id = overrideId;

0 commit comments

Comments
 (0)