Skip to content

Commit

Permalink
Fix PDF redirection for Firefox
Browse files Browse the repository at this point in the history
The new arxiv.org behavior (at the time of commit 72f8350), which
redirects (HTTP 302) PDF pages to browse.arxiv.org, has been reverted.

The redirection is a temporary behavior of arxiv.org. Therefore, we
should still redirect PDF pages in the arxiv.org domain, instead of only
redirecting PDF pages in the browse.arxiv.org domain.
  • Loading branch information
j3soon committed Oct 9, 2023
1 parent c581946 commit 35571bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firefox/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const pdfViewerRelatedURL = "pdfviewer.html?target=";
// However, if `https://arxiv.org/pdf/<id>/` is the direct link, no redirection will happen,
// we need to capture this too.
const redirectPatterns = [
"*://arxiv.org/ftp/*.pdf*", "*://export.arxiv.org/*.pdf*", "*://browse.arxiv.org/*.pdf*",
"*://arxiv.org/ftp/*pdf*/", "*://export.arxiv.org/*pdf*/", "*://browse.arxiv.org/*pdf*/",
"*://arxiv.org/*.pdf*", "*://export.arxiv.org/*.pdf*", "*://browse.arxiv.org/*.pdf*",
"*://arxiv.org/*pdf*/", "*://export.arxiv.org/*pdf*/", "*://browse.arxiv.org/*pdf*/",
];
// Regular expressions for parsing target navigation URL from URLs.
// Ref: https://info.arxiv.org/help/arxiv_identifier_for_services.html#urls-for-standard-arxiv-functions
Expand Down

0 comments on commit 35571bf

Please sign in to comment.