diff --git a/src/background/detect-content-type.ts b/src/background/detect-content-type.ts index 56975b27..edca0329 100644 --- a/src/background/detect-content-type.ts +++ b/src/background/detect-content-type.ts @@ -34,6 +34,30 @@ export function detectContentType( if (document_.querySelector('embed[type="application/pdf"]')) { return { type: 'PDF' }; } + + // Detect Chrome's PDF viewer when it is using out-of-process iframes + // ("OOPIF") instead of ``. + // + // In this case the DOM has a structure like: + // + // ``` + // + // # closed shadow root + // -