• Stars
    star
    193
  • Rank 201,081 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Meaningful titles for tabs and PDF downloads! Also supports tab search.

arxiv-utils

tests build

icon

A collection of features that enhance your reading experience on ArXiv (and some other sites):

  • Renames the title of PDF page to the paper's title.
  • Adds a button 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 and arXiv Vanity.
  • Works with Native Tab Search, and other plugins! (See the Solution Descriptions section for more details)
  • All required permissions are documented in detail.

Please open an issue if you have any questions, feature requests, or bug reports.

Download Links

Supports Chrome, Firefox, Edge, Firefox on Android. (Not tested on Android)

Alternatively, these 3 browsers can also load arxiv-utils directly from source. First, download the source code release from Releases, and then load the extension as an unpacked extension following the Development Section.

Screenshots

The paper id in the title has been removed automatically!
A direct download link is added to download PDF with paper's title as the filename!
Open in extra services such as ar5iv! Finally... Meaningful paper title instead of paper id! (For Firefox, this is achieved through a custom PDF container.) Difficult to get back to abstract page...
Click to get back to abstract page! TADA~ The abstract page is shown at the right of the PDF page! Both with meaningful title! The button is disabled if not in ArXiv's domain.
Meaningful bookmark titles. Meaningful OneTab entries! (Chrome & Edge only) Opened too many tabs? Search in terms of the paper title! Works well with vertical tabs. Right-click the extension icon and select Options to set your preference. (Chrome & Edge) Go to add-ons page, click the extension select Options to set your preference. (Firefox)

Solution Descriptions

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 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 and arXiv Vanity.
  • Better title even for bookmarks and the OneTab plugin!
  • Firefox has strict restrictions on PDF.js. 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)

Options

  • filename format:
    • Default: ${title}, ${firstAuthor} et al., ${publishedYear}, v${version}.pdf
    • ${title} is replaced with the paper title.
    • ${firstAuthor} is replaced with the first author of the paper.
    • ${authors} is replaced with all authors separated by commas.
    • ${publishedYear} is replaced with the published year of the paper.
    • ${updatedYear} is replaced with the updated year of the current paper version.
    • ${version} is replaced with the version of the current paper.
  • (Firefox) Enable PDF redirection:
    • Default: true
    • Set to false to disable PDF redirection. This will disallow renaming for PDF tabs.
  • (Firefox, Experimental) external PDF viewer URL prefix:
    • Default: (empty), uses the custom PDF container.
    • Set to https://mozilla.github.io/pdf.js/web/viewer.html?file=, enables Screenshots and Go Back by using pdf.js as PDF viewer.

Privacy Policy

We do not gather your personal data. If in doubt, please refer to the source code.

Chrome / Edge Permissions

  • tabs: On extension button click, open a new tab and move it to the right of the old active tab.
  • activeTab: Read active tab's title and modify it using the tab's url.
  • storage: Save extension configurations.
  • contextMenus: When right-click the extension button, show a help menu item.
  • scripting: Inject content scripts to existing tabs.
  • *://export.arxiv.org/*: Inject content scripts to existing tabs.
  • *://arxiv.org/*: Inject content scripts to existing tabs.

Firefox Permissions

  • tabs: On extension button click, open a new tab and move it to the right of the old active tab.
  • activeTab: Read active tab's title and modify it using the tab's url.
  • storage: Save extension configurations.
  • contextMenus: When right-click the extension button, show a help menu item.
  • 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.
  • *://export.arxiv.org/*pdf*: Redirect PDF pages to custom PDF container.
  • *://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;": 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

Development

For viewing the content script logs, open the Inspector of the arXiv webpage (as in normal web development).

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.

Tests

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.

Other functions should still be tested manually:

  • Bookmark tests: Test the bookmarked URL.
    • Try to bookmark an abstract tab, the title should be the new title.
    • Try to bookmark a PDF tab, the title should be the new title.
    • (Firefox Only) Check the PDF bookmark's URL, it should be the original ArXiv PDF link.
  • Download tests: Test the downloaded file name.
    • Test PDF download (Download PDF (arxiv-utils)) in abstract. In firefox, only mouse left-click works, middle-click open up the original PDF page in a new tab.
    • Change filename format options, reload page, and download to verify the filename is changed.
    • Reset filename format option to default, reload page, and download to verify the filename format is default.
    • Test papers with long title.
    • Test papers with special characters in title.
  • The extension button should be disabled outside ArXiv's domain.
  • Clicking the extension button should open a new tab at the right of the current active tab (instead of open at the end of the tab list).
  • (Chrome Only) If OneTab is installed, click its extension button, the list should show the updated titles of both abstract and PDF page.
  • (Chrome Only) Clear the browser cache and reload the PDF page, the title should be the new title after PDF load.
    Test with: https://arxiv.org/abs/1512.03385
  • Verify there are no console errors in both the content script and background script logs.
  • Disable and re-enabling the extension should not cause any errors.
  • Installing or re-enabling the extension should immediately update the title of existing tabs.
  • 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

Install VSCode and Dev Containers plugin.

tests/scripts/docker-compose.sh up -d

Press Ctrl + P and select >Dev Container: Attach to Running Container..., then select /tests_selenium-tests_1.

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

Install the Python plugin inside the dev container.

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).

You can now begin interactive testing!

Reference: Developing inside a Container

Build and Publish

Store dashboards:

May need to update description, permission details, and screenshots for Firefox and Chrome store.

Download the signed .crx or .xpi files:

Frequently Asked Questions (FAQ)

  • Q: Why redirect PDFs to a custom viewer in Firefox?

    A: This is due to a bug in Firefox that disallows executing content scripts in the built-in pdf.js viewer, which disallows renaming for PDF tabs. See Firefox Bug 1454760 for more details.

  • Q: Why do the custom PDF viewer in Firefox lacks many features?

    A: Since these features cannot be enabled easily. See #4 and #13 for further details.

  • Q: Selenium (or WebDriver) has no API to click addon/extension buttons, how do the automated tests click the arxiv-utils button?

    A: This can be achieved by any tool that can simulate mouse click. Since we use Selenium Grid, for simplicity, we apply a hacky workaround that use one meta browser to click the arxiv-utils button in another browser through VNC web viewer. I'm not sure if other testing tools can achieve this more easily.

If you have further questions, please open an issue.

Related Extensions

More Repositories

1

tbparse

Load tensorboard event logs as pandas DataFrames for scientific plotting; Supports both PyTorch and TensorFlow
Python
106
star
2

dfac

[ICML 2021] DFAC Framework: Factorizing the Value Function via Quantile Mixture for Multi-Agent Distributional Q-Learning
Python
22
star
3

Handwritten-Digit-Recognition-Painter

A handwritten digit recognition painter implementation on Basys 3 Artix-7 FPGA using Verilog.
VHDL
21
star
4

speech-to-windows-input

Perform speech-to-text (STT/ASR) with Azure speech service and simulate keyboard to input the recognized text; Supports English, Chinese, Japanese, and more
C#
15
star
5

OmniIsaacGymEnvs-UR10Reacher

UR10 Reacher Reinforcement Learning Sim2Real Environment for Omniverse Isaac Gym/Sim
Python
14
star
6

OmniIsaacGymEnvs-DofbotReacher

Dofbot Reacher Reinforcement Learning Sim2Real Environment for Omniverse Isaac Gym/Sim
Python
11
star
7

directed-graph-visualization

A simple example of creating javascript directed-graph for topic relationship visualization using d3.js (v4)
HTML
8
star
8

ros2-essentials

A repo containing essential ROS2 (Humble) features for controlling Autonomous Mobile Robots (AMRs).
C++
6
star
9

Allegro5Template

C
6
star
10

minimal-mistakes-template

Create your personal blog with MathJax, LaTex, and more built-in features by cloning this template.
HTML
4
star
11

PrintScreen

Save screenshot on key press
C#
4
star
12

whisper-to-input

An Android keyboard that performs speech-to-text (STT/ASR) with OpenAI Whisper and input the recognized text; Supports English, Chinese, Japanese, etc. and even mixed languages.
Kotlin
4
star
13

medical-ai-bridge

A lightweight solution to bridge the gap between DICOM (PACS) server (in the hospital) and a customized AI server.
3
star
14

LowLevelControls

Helper class for mouse, keyboard and screen controls
C#
3
star
15

isaac-sdk-extended

Provide some Isaac SDK examples and notes not included in the toolkit.
CMake
3
star
16

Allegro5OOPTemplate

An Object-Oriented 2D game library written from scratch. Includes a 2D tower defense game that supports enemy path-planning and homing missiles.
C++
2
star
17

Blogger-Widgets

HTML
2
star
18

isaac-sim-extended

Provide some Isaac Sim examples and notes not included in the toolkit.
Python
2
star
19

OverlayWindow

Simple topmost semi-transparent window using MonoGame
C#
2
star
20

TakeBackTheColors

A 2D platformer game about a rabbit swinging through the jungle with its carrot to save her village by retrieving the color crystal.
TypeScript
2
star
21

mathjax-tooltips

MathJax does not support tooltips by default. This is a sample that allows even overlapping tooltip targets.
HTML
1
star
22

nuxtjs-d3js-example

Guide on setting up d3.js in nuxt.js
Vue
1
star
23

nvidia-isaac-summary

An unofficial summary of NVIDIA Isaac
1
star
24

robot-setup-notes

1
star
25

OfflineJudgeTestTools

Tools for testing your code offline
C++
1
star
26

PortableConfiguration

Simple configuration saver
C#
1
star
27

xterm.js-embedded-example

A minimal example for demonstrating using xterm.js in an embedded fashion. (support window resize)
HTML
1
star
28

firefox-enable-pdf-addons

Work In Progress
1
star
29

hackmd-online-counter

Almost the same with HackMD's online user counter
HTML
1
star
30

AHK_Scripts

My AutoHotkey Scripts
AutoHotkey
1
star
31

research-tutorial

Some notes on conducting Computer Science research
1
star