Skip to content

Commit

Permalink
redirect xxx.lanl.gov issue #12
Browse files Browse the repository at this point in the history
As in:
MJKirk@0b0551b
The old xxx.lanl.gov url is dead, and redirects to an unhelpful error
message - redirect to arXiv instead.
  • Loading branch information
imurray committed Mar 8, 2021
1 parent 2f3dff7 commit 09b9802
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"manifest_version": 2,
"name": "Redirectify",
"version": "0.3.1",
"version": "0.3.2",

"description": "Redirects requests for PDFs of papers at some popular sites to their corresponding HTML index pages.",

Expand All @@ -11,7 +11,7 @@
"permissions": [
"*://*.arxiv.org/pdf/*",
"*://*.inspirehep.net/*",
"*://xxx.lanl.gov/pdf/*",
"*://xxx.lanl.gov/*",
"*://arxiv-export-lb.library.cornell.edu/pdf/*",
"*://arxiv.org/ftp/*pdf",
"*://*.openreview.net/pdf*",
Expand Down
2 changes: 1 addition & 1 deletion src/redirectify.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

RULES = [
["*://*.arxiv.org/pdf/*", /(.*)\/pdf\/(.*?)(\.pdf)?$/, '$1/abs/$2', ['.inspirehep.net']],
["*://xxx.lanl.gov/pdf/*", /(.*)\/pdf\/(.*?)(\.pdf)?$/, '$1/abs/$2'],
["*://xxx.lanl.gov/*", /.*xxx\.lanl\.gov\/(.*)/, 'https://arxiv.org/$1'],
["*://arxiv-export-lb.library.cornell.edu/pdf/*", /(.*)\/pdf\/(.*?)(\.pdf)?$/, '$1/abs/$2'],
["*://arxiv.org/ftp/*pdf", /.*arxiv()\/papers\/....\/(.*)\.pdf|.*\/([^\/]*\/)papers\/....\/([^.]*)\.pdf.*/, 'https://arxiv.org/abs/$1$2$3$4'],
["*://*.openreview.net/pdf*", /pdf\?id=/, 'forum?id='],
Expand Down
1 change: 1 addition & 0 deletions test_cases
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ https://arxiv.org/pdf/1602.07527.pdf
https://arxiv.org/pdf/1602.07527
https://arxiv.org/ftp/arxiv/papers/1702/1702.01715.pdf
https://arxiv.org/ftp/cond-mat/papers/0408/0408502.pdf
http://xxx.lanl.gov/pdf/hep-ph/0307297.pdf
https://www.biorxiv.org/content/biorxiv/early/2017/09/18/113480.full.pdf
https://www.biorxiv.org/content/early/2017/09/18/113480.full.pdf
http://www.jmlr.org/papers/volume17/16-272/16-272.pdf
Expand Down

0 comments on commit 09b9802

Please sign in to comment.