Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check WeChat #7822

Closed
wants to merge 1 commit into from
Closed

check WeChat #7822

wants to merge 1 commit into from

Conversation

godwin668
Copy link

solve issue:
#7815
#7754
#7800

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you've addressed the two inline comments, don't forget to squash the commits (see https://github.com/mozilla/pdf.js/wiki/Squashing-Commits).

Edit: Also, the commit message could probably be improved, since "check WeChat" isn't terribly informative. How about e.g. "Disable range requests in compatibility.js for the WeChat browser" instead?

@@ -469,8 +469,10 @@ if (typeof PDFJS === 'undefined') {

// Range requests are broken in Chrome 39 and 40, https://crbug.com/442318
var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(navigator.userAgent);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the two trailing spaces from this line.

@@ -469,8 +469,10 @@ if (typeof PDFJS === 'undefined') {

// Range requests are broken in Chrome 39 and 40, https://crbug.com/442318
var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(navigator.userAgent);

var isWeChat = /micromessenger/.test(navigator.userAgent);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably best to make this regular expression case-insensitive, to prevent any future issues, e.g. change it to /micromessenger/i.test(navigator.userAgent); instead.

@timvandermeij
Copy link
Contributor

Superseded by #7841.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants