Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: j3soon/arxiv-utils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.8.0
Choose a base ref
...
head repository: j3soon/arxiv-utils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Oct 8, 2023

  1. Copy the full SHA
    c581946 View commit details

Commits on Oct 9, 2023

  1. Fix PDF redirection for Firefox

    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.
    j3soon committed Oct 9, 2023
    Copy the full SHA
    35571bf View commit details
  2. Optimize Firefox PDF viewer

    j3soon committed Oct 9, 2023
    Copy the full SHA
    5eca5df View commit details
  3. Copy the full SHA
    772572c View commit details
  4. Fix testcases by reverting browse.arxiv.org

    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 revert the testcases changes in commit 72f8350.
    j3soon committed Oct 9, 2023
    Copy the full SHA
    5818a51 View commit details
  5. Copy the full SHA
    57892fe View commit details
  6. Copy the full SHA
    e6a4cde View commit details

Commits on Oct 11, 2023

  1. Copy the full SHA
    0fe6a62 View commit details

Commits on Oct 13, 2023

  1. Fix direct download error on paper titles with colons

    Chrome error message:
    
        Uncaught (in promise) Error: Invalid filename
    
    Firefox error message:
    
        Error: filename must not contain illegal characters
    j3soon committed Oct 13, 2023
    Copy the full SHA
    559faf8 View commit details
  2. Copy the full SHA
    66d4326 View commit details
  3. Bump version numbers to v1.8.2

    j3soon committed Oct 13, 2023
    Copy the full SHA
    e9931bf View commit details

Commits on Oct 29, 2023

  1. Copy the full SHA
    aea7406 View commit details
  2. Copy the full SHA
    8589188 View commit details

Commits on Nov 26, 2023

  1. Add support for JMLR

    fepegar committed Nov 26, 2023
    Copy the full SHA
    38a8f03 View commit details

Commits on Nov 27, 2023

  1. Fix URL

    fepegar committed Nov 27, 2023
    Copy the full SHA
    1fb7dae View commit details
  2. Merge pull request #32 from fepegar/add-jmlr

    Add support for JMLR
    j3soon authored Nov 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    36e6d60 View commit details

Commits on Jan 5, 2024

  1. Copy the full SHA
    3c9e2ed View commit details
  2. Solve issue #35

    htadashi authored Jan 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f194b4b View commit details
  3. Copy the full SHA
    f1bfb87 View commit details
  4. Merge pull request #36 from htadashi/patch-1

    Drop support and tests for arXiv Vanity since it has been shutdown
    
    Fixes: #35
    j3soon authored Jan 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fd2dca1 View commit details

Commits on Apr 13, 2024

  1. Copy the full SHA
    057b0db View commit details
  2. Copy the full SHA
    f519434 View commit details
  3. Improve local tests by cleaning up elegantly upon exception

    j3soon committed Apr 13, 2024
    Copy the full SHA
    0e6a84e View commit details
  4. Bump version numbers to v1.8.3

    j3soon committed Apr 13, 2024
    Copy the full SHA
    e0ccee7 View commit details

Commits on Jun 1, 2024

  1. fix: Rename PDF tabs not ending with .pdf

    The arXiv site link changed from `Download PDF` to `View PDF`. This new `View PDF` link points to a different URL (without trailing `.pdf`), which isn't re-directed to the custom PDF viewer by the old redirect pattern.
    
    Fixes: #40
    j3soon committed Jun 1, 2024
    Copy the full SHA
    7e658d9 View commit details
  2. Copy the full SHA
    42a3522 View commit details
  3. Copy the full SHA
    d8ac62a View commit details
  4. feat!: Navigate to urls without trailing pdf

    This is based on the arXiv website change from `Download PDF` to `View PDF`.
    
    See commit 7e658d9 for more info.
    j3soon committed Jun 1, 2024
    Copy the full SHA
    12a53e5 View commit details
  5. fix: Skip urls containing pdf in default tests

    j3soon committed Jun 1, 2024
    Copy the full SHA
    54fe365 View commit details
  6. build: Bump version numbers to v1.8.4

    j3soon committed Jun 1, 2024
    Copy the full SHA
    6472571 View commit details

Commits on Aug 3, 2024

  1. Add link to alphaXiv

    htadashi committed Aug 3, 2024
    Copy the full SHA
    a63d56d View commit details

Commits on Aug 4, 2024

  1. ci: Upgrade to compose v2

    j3soon committed Aug 4, 2024
    Copy the full SHA
    44a3f05 View commit details
  2. Merge pull request #46 from htadashi/master

    feat: add link to alphaXiv in extra services menu
    j3soon authored Aug 4, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    dac9d22 View commit details
  3. fix: Support downloading papers with long titles

    BREAKING CHANGE: Replace `:` with `,` instead of `_` for readability.
    j3soon committed Aug 4, 2024
    Copy the full SHA
    0ef5739 View commit details
  4. ci: Isolate end-to-end-test

    j3soon committed Aug 4, 2024
    Copy the full SHA
    0ee67dd View commit details
  5. Copy the full SHA
    0b02b3d View commit details
  6. docs: typo

    j3soon committed Aug 4, 2024
    Copy the full SHA
    7540ebc View commit details
  7. refactor: Isolate TARGET_URL_REGEXP_REPLACE to its own js file

    * Ref (Chrome, Manifest V3): https://stackoverflow.com/a/70218881
    * Ref (Firefox, Manifest V2): https://stackoverflow.com/a/67513850
    j3soon committed Aug 4, 2024
    Copy the full SHA
    995cfe3 View commit details
  8. ci: Run tests only when needed

    j3soon committed Aug 4, 2024
    Copy the full SHA
    9422c73 View commit details
  9. Copy the full SHA
    e84b070 View commit details
  10. Copy the full SHA
    2465b97 View commit details
  11. Copy the full SHA
    c49e3dd View commit details
  12. test: Add unit tests

    j3soon committed Aug 4, 2024
    Copy the full SHA
    cdc8eeb View commit details
  13. ci: Add jest unit tests

    j3soon committed Aug 4, 2024
    Copy the full SHA
    f33309b View commit details
  14. feat: Support basic IEEE

    Fixes: #43
    j3soon committed Aug 4, 2024
    Copy the full SHA
    b4e0f76 View commit details
  15. feat: Support navigate from HuggingFace

    j3soon committed Aug 4, 2024
    Copy the full SHA
    8096f62 View commit details
  16. build: Bump version numbers to v1.8.5

    j3soon committed Aug 4, 2024
    Copy the full SHA
    0bf1648 View commit details

Commits on Oct 20, 2024

  1. Fix typo

    j3soon committed Oct 20, 2024
    Copy the full SHA
    637d718 View commit details
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is. The sections below are not mandatory, if you're unsure about a certain section, feel free to remove the entire section.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem. For example:
- Upload a screenshot/video of the actual (incorrect) behavior.
- Take a screenshot of the Developer Console (`Right Click > Inspect > Console`) right after reproducing the bug.
- If there are no errors in the Developer Console, it would be beneficial to inspect the background script logs following [the steps here](https://github.com/j3soon/arxiv-utils#development), and also take a screenshot of the errors.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

<!--
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
-->

**Additional context**
Add any other context about the problem here.

Make sure you have reproduced the bug in a new browser profile with no other extensions installed. If you have not, please do so before submitting the bug report to prevent extensions from interfering with each other.
25 changes: 25 additions & 0 deletions .github/workflows/test-with-jest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: unit-tests
on:
push:
paths:
- .github/workflows/test-with-jest.yaml
- tests/testcases/**
- tests/unit-test/**
pull_request:
jobs:
test-with-jest:
name: Unit Test with Jest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Pull docker images
run: docker compose -f tests/unit-test/compose.yml pull
- name: Start test containers
run: docker compose -f tests/unit-test/compose.yml up -d
# Start testing
- name: Test navigation
run: docker exec -t unit-test-jest-tests-1 /app/tests/unit-test/install-and-run.sh
# Clean up
- name: Stop test containers
if: always()
run: docker compose -f tests/unit-test/compose.yml down
15 changes: 11 additions & 4 deletions .github/workflows/test-with-selenium.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
name: tests
name: end-to-end-tests
on:
- push
- pull_request
push:
paths:
- .github/workflows/test-with-selenium.yaml
- chrome/**
- firefox/**
- tests/scripts/**
- tests/testcases/**
- tests/end-to-end-test/**
pull_request:
jobs:
test-with-selenium:
name: Test with Selenium
name: End-to-end Test with Selenium
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
101 changes: 87 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# arxiv-utils

[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/test-with-selenium.yaml?label=tests)](https://github.com/j3soon/arxiv-utils/actions/workflows/test-with-selenium.yaml)
[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/test-with-jest.yaml?label=unit-tests)](https://github.com/j3soon/arxiv-utils/actions/workflows/test-with-jest.yaml)
[![tests](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/test-with-selenium.yaml?label=end-to-end-tests)](https://github.com/j3soon/arxiv-utils/actions/workflows/test-with-selenium.yaml)
[![build](https://img.shields.io/github/actions/workflow/status/j3soon/arxiv-utils/build-and-publish.yaml)](https://github.com/j3soon/arxiv-utils/actions/workflows/build-and-publish.yaml)

[![](https://img.shields.io/chrome-web-store/v/mnhdpeipjhhkmlhlcljdjpgmilbmehij.svg)](https://chrome.google.com/webstore/detail/arxiv-utils/mnhdpeipjhhkmlhlcljdjpgmilbmehij)
@@ -22,7 +23,7 @@ A collection of features that enhance your reading experience on ArXiv (and some
- Renames the title of PDF page to the paper's title.
- Adds a button and hotkey (`Alt+A`) to navigate back to Abstract page for arXiv, OpenReview, and more.
- Download PDF with paper's title as filename.
- Open the paper in extra services such as [ar5iv](https://ar5iv.labs.arxiv.org/) and [arXiv Vanity](https://www.arxiv-vanity.com/).
- Open the paper in extra services such as [ar5iv](https://ar5iv.labs.arxiv.org/).
- Works with Native Tab Search, and other plugins! (See the [Solution Descriptions](#solution-descriptions) section for more details)
- All required permissions are documented in detail.

@@ -72,7 +73,7 @@ For ArXiv PDF / abstract tabs:
- Renames the title to paper's title automatically in the background. (Originally is meaningless paper id, or start with paper id)
- Add an action button (or `Alt+A`) to open its corresponding abstract / PDF page. (Originally is hard to get back to abstract page from PDF page)
- Add a direct download link on abstract page, click it to download the PDF with the title as filename. (Originally is paper id as filename)
- Open the paper in extra services such as [ar5iv](https://ar5iv.labs.arxiv.org/) and [arXiv Vanity](https://www.arxiv-vanity.com/).
- Open the paper in extra services such as [ar5iv](https://ar5iv.labs.arxiv.org/).
- Better title even for bookmarks and the [OneTab](https://www.one-tab.com/) plugin!
- Firefox has [strict restrictions on PDF.js](https://bugzilla.mozilla.org/show_bug.cgi?id=1454760). So it doesn't work well with OneTab, the PDF renaming is achieved by intercepting requests and show the PDF in a container. The bookmark works well though.
- Works well with native tab search (credits: [@The Rooler](https://addons.mozilla.org/en-US/firefox/addon/arxiv-utils/reviews/1674567/))
@@ -112,9 +113,11 @@ We do not gather your personal data. If in doubt, please refer to the source cod
- `storage`: Save extension configurations.
- `contextMenus`: When right-click the extension button, show a help menu item.
- `scripting`: Inject content scripts to existing tabs.
- `downloads`: Direct download PDF with paper's title as filename.
- `*://arxiv.org/*`: Inject content scripts to existing tabs.
- `*://export.arxiv.org/*`: Inject content scripts to existing tabs.
- `*://browse.arxiv.org/*`: Inject content scripts to existing tabs.
- `*://www.arxiv.org/*`: Inject content scripts to existing tabs.
- `*://ar5iv.labs.arxiv.org/*`: Inject content scripts to existing tabs.

### Firefox Permissions
@@ -126,10 +129,12 @@ We do not gather your personal data. If in doubt, please refer to the source cod
- `webRequest`: Intercept ArXiv PDF request.
- `webRequestBlocking`: Redirect the ArXiv PDF page to custom PDF container page.
- `bookmarks`: When create a new bookmark of the PDF container page, bookmark the actual ArXiv PDF url instead.
- `downloads`: Direct download PDF with paper's title as filename.
- `*://arxiv.org/*pdf*`: Redirect PDF pages to custom PDF container.
- `*://export.arxiv.org/*pdf*`: Redirect PDF pages to custom PDF container.
- `*://browse.arxiv.org/*pdf*`: Redirect PDF pages to custom PDF container.
- `"content_security_policy": "script-src 'self'; object-src 'self' https://arxiv.org https://export.arxiv.org https://browse.arxiv.org;"`: For embedding PDF in container.
- `*://www.arxiv.org/*pdf*`: Redirect PDF pages to custom PDF container.
- `"content_security_policy": "script-src 'self'; object-src 'self' https://arxiv.org https://export.arxiv.org https://browse.arxiv.org https://www.arxiv.org;"`: For embedding PDF in container.
- `"web_accessible_resources": [ "pdfviewer.html" ]`: To redirect from HTTPS to extension custom page requires them to be visible.

## Developer Notes
@@ -145,7 +150,7 @@ For viewing the content script logs, open the Inspector of the arXiv webpage (as
For viewing background script logs, open the Inspector of the plugin in the `Extensions` page.
- Firefox: Go to `about:debugging#/runtime/this-firefox` and click `Inspect` on the temporarily loaded extension.
- Chrome: Go to `chrome://extensions/` and click `Inspect views: background page` on the loaded (unpacked) extension.
- Edge: Go to `edge://extensions/` and click `Inspect views: service workder` on the loaded (unpacked) extension.
- Edge: Go to `edge://extensions/` and click `Inspect views: service worker` on the loaded (unpacked) extension.

### Tests

@@ -154,7 +159,7 @@ The automated tests currently include the following:
- **Default tests**: Test the default title name of arXiv abstract/PDF pages.
- **Navigation tests**: Test the arxiv-utils button can switch between arXiv abstract/PDF pages, and the title is modified.

The testcases along with their description is stored in [tests/testcases.yaml](tests/testcases.yaml).
The testcases along with their description is stored in [tests/testcases/testcases.yaml](tests/testcases/testcases.yaml).

Other functions should still be tested manually:

@@ -179,7 +184,65 @@ Other functions should still be tested manually:
- The help menu item in the context menu should link to this GitHub page.
- ar5iv tabs should have renamed title, and support navigation.

### Interactive Testing
### Run Unit Tests Locally

Launch the docker containers:

```sh
cd tests/unit-test
docker compose up -d
```

Then run the tests:

```sh
docker exec -t unit-test-jest-tests-1 \
/app/tests/unit-test/install-and-run.sh
```

When done, stop the containers:

```sh
cd tests/unit-test
docker compose down
```

### Run End-to-End Tests Locally

Launch the docker containers:

```sh
cd tests/end-to-end-test
docker compose up -d
```

Then run the tests:

```sh
docker exec -t end-to-end-test-selenium-tests-1 \
python "/app/tests/end-to-end-test/test_navigation.py"
```

When adding new test cases, it is often convenient to comment out existing test cases in [tests/testcases/testcases.yaml](tests/testcases/testcases.yaml); When testing specific browsers, you can modify the `for browser in [...]` part in [tests/test_navigation.py](tests/test_navigation.py) to only run tests for the desired browser.

> If the test logs stuck at launching the webdriver, you may need to restart the containers.
View the logs or open the following URLs for more details:
- [Selenium Grid](http://localhost:4444/ui)
- [noVNC for Chrome](http://localhost:7900)
- [noVNC for Edge](http://localhost:7901)
- [noVNC for Firefox](http://localhost:7902)

> The default password for noVNC is `secret`.
When done, stop the containers:

```sh
cd tests/end-to-end-test
docker compose down
```

### Interactive End-to-End Testing

Install VSCode and [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) plugin.

@@ -188,7 +251,7 @@ tests/scripts/docker-compose.sh up -d
```

Press `Ctrl + P` and select `>Dev Container: Attach to Running Container...`,
then select `/tests_selenium-tests_1`.
then select `/end-to-end-test-selenium-tests-1`.

In the new VSCode window, click `Open Folders` and select `/app`.

@@ -200,12 +263,20 @@ Launch a Terminal inside the dev container and run:
apk add build-base linux-headers
```

Open `tests/test_interactive.py`, select the first cell and press `Shift + Enter` and click `Install` (Install the `ipykernel`).
Open `tests/end-to-end-test/test_interactive.py`, select the first cell and press `Shift + Enter` and click `Install` (Install the `ipykernel`).

You can now begin interactive testing!

Reference: [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers)

### arXiv API

```sh
curl "https://export.arxiv.org/api/query?id_list=<ARXIV_ID>"
```

Reference: [arXiv API User's Manual](https://info.arxiv.org/help/api/user-manual.html#332-entry-metadata)

### Build and Publish

Store dashboards:
@@ -243,13 +314,15 @@ If you have further questions, please [open an issue](https://github.com/j3soon/

## Related Extensions

- [musically-ut/arXiv-title-fixer](https://github.com/musically-ut/arXiv-title-fixer)
- [musically-ut/arXiv-title-fixer](https://github.com/musically-ut/arXiv-title-fixer)
This requires a button click to change the pdf title, but will be considered less intrusive than running in the background. (Chrome Only)
- [weakish/arxiv-url](https://github.com/weakish/arxiv-url)
- [weakish/arxiv-url](https://github.com/weakish/arxiv-url)
This claims to add a back button, but I can't get it working.
- [imurray/redirectify](https://github.com/imurray/redirectify)
- [imurray/redirectify](https://github.com/imurray/redirectify)
Automatically redirect PDF links to HTML index page for many academic paper sites. (Compatible with arxiv-utils)
- [vict0rsch/PaperMemory](https://github.com/vict0rsch/PaperMemory)
If you're looking for an extension with a wider range of useful features, this extension offers just that. Although its UI modifications are slightly more intrusive than arxiv-utils, it is totally acceptable considering that it has so many extra features. It's also worth noting that arxiv-utils does not automatically invoke APIs from external services, which is a difference in design philosophy.
- [AI/ML Papers with Code Everywhere - CatalyzeX](https://www.catalyzex.com/)
Find code links and inject them to a variety of websites. (Compatible with arxiv-utils)
[[chrome]](https://chrome.google.com/webstore/detail/aiml-papers-with-code-eve/aikkeehnlfpamidigaffhfmgbkdeheil?hl=en)
[[firefox]](https://addons.mozilla.org/en-US/firefox/addon/code-finder-catalyzex/)
[[firefox]](https://addons.mozilla.org/en-US/firefox/addon/code-finder-catalyzex/)
Find code links and inject them to a variety of websites. (Compatible with arxiv-utils)
23 changes: 2 additions & 21 deletions chrome/background.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
// This background script implements the extension button,
// and triggers the content script upon tab title change.
import TARGET_URL_REGEXP_REPLACE from './target_url_regexp_replace.js';

// 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
const TARGET_URL_REGEXP_REPLACE = [
[/^.*:\/\/(?:export\.|browse\.)?arxiv\.org\/abs\/(\S*?)\/*(\?.*?)?(\#.*?)?$/, "https://arxiv.org/pdf/$1.pdf"],
[/^.*:\/\/(?:export\.|browse\.)?arxiv\.org\/pdf\/(\S*?)(?:\.pdf)?\/*(\?.*?)?(\#.*?)?$/, "https://arxiv.org/abs/$1"],
[/^.*:\/\/(?:export\.|browse\.)?arxiv\.org\/ftp\/(?:arxiv\/|([^\/]*\/))papers\/.*?([^\/]*?)\.pdf(\?.*?)?(\#.*?)?$/, "https://arxiv.org/abs/$1$2"],
[/^.*:\/\/ar5iv\.labs\.arxiv\.org\/html\/(\S*?)\/*(\?.*?)?(\#.*?)?$/, "https://arxiv.org/abs/$1"],
[/^.*:\/\/www\.arxiv-vanity\.com\/papers\/(\S*?)\/?(\?.*?)?(\#.*?)?$/, "https://arxiv.org/abs/$1"],
[/^.*:\/\/openreview\.net\/forum\?id=(\S*?)(&.*?)?(\#.*?)?$/, "https://openreview.net/pdf?id=$1"],
[/^.*:\/\/openreview\.net\/pdf\?id=(\S*?)(&.*?)?(\#.*?)?$/, "https://openreview.net/forum?id=$1"],
// Starting from 2022, NIPS urls may end with a `-Conference` suffix
[/^.*:\/\/(papers|proceedings)\.(nips|neurips)\.cc\/paper_files\/paper\/(\d*)\/(?:[^\/]*)\/(.*?)-Abstract(-Conference)?\.html(\?.*?)?(\#.*?)?$/,
"https://$1.$2.cc/paper_files/paper/$3/file/$4-Paper$5.pdf"],
[/^.*:\/\/(papers|proceedings)\.(nips|neurips)\.cc\/paper_files\/paper\/(\d*)\/(?:[^\/]*)\/(.*?)-.*?(-Conference)?\..*?(\?.*?)?(\#.*?)?$/,
"https://$1.$2.cc/paper_files/paper/$3/hash/$4-Abstract$5.html"],
[/^.*:\/\/proceedings\.mlr\.press\/(.*?)\/(.*?)(?:\/.*?)?(?:-supp)?\.pdf$/, "https://proceedings.mlr.press/$1/$2.html"],
[/^.*:\/\/proceedings\.mlr\.press\/(.*?)\/(.*?)(?:\.html)?(\?.*?)?(\#.*?)?$/, "https://proceedings.mlr.press/$1/$2/$2.pdf"],
[/^.*:\/\/openaccess\.thecvf\.com\/(.*?)\/html\/(.*?)\.html(\?.*?)?(\#.*?)?$/, "https://openaccess.thecvf.com/$1/papers/$2.pdf"],
[/^.*:\/\/openaccess\.thecvf\.com\/(.*?)\/papers\/(.*?)\.pdf(\?.*?)?(\#.*?)?$/, "https://openaccess.thecvf.com/$1/html/$2.html"],
];
// All console logs should start with this prefix.
const LOG_PREFIX = "[arXiv-utils]";

@@ -85,7 +66,7 @@ async function onMessage(message) {
filename: message.filename,
saveAs: false,
});
console.log(LOG_PREFIX, `Downloaded file: ${message.filename} from ${message.url}.`)
console.log(LOG_PREFIX, `Downloading file: ${message.filename} from ${message.url}.`)
}
function onContextClicked(info, tab) {
if (info.menuItemId === 'help')
Loading