{{ message }}
fix: fix 614, 619.#620
Open
cryptogun wants to merge 1 commit into
Open
Conversation
PDF content will be displayed within a shadow DOM for Chrome newer versions, so we can't query within the PDF DOMs anymore to decide if it's managed by the builtin PDF viewer. Current workaround is to check if this is a PDF file and if it's rendered by the builtin viewer (non extension).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

describe the bug/feature 解决的问题或新增的功能
fixes 614, 619.
PDF content will be displayed within a shadow DOM for Chrome newer versions, so we can't query within the PDF DOMs anymore to decide if it's managed by the builtin PDF viewer.
summary of code change 描述发生的改变
Current workaround is to check if this is a PDF file and if it's rendered by the builtin viewer (non extension).
新版本的Chrome内置pdf浏览器在显示pdf内容时,除了
<body>等tag的字符,整个内部pdf内容是独立的。无法再通过js查询判断是不是内置pdf浏览器isChromePDFViewer().目前的绕开方法是无脑判断文件(URL)是不是以
.pdf结尾。并且这个URL不是插件(比如本插件)渲染的,那就说明是由内置pdf浏览器打开的了。