/librium

Chrome extension that adds links to documents on SciHub or local libraries

Primary LanguageJavaScript

What

A Chrome extension that will automatically pop up a window with links to free versions of the thing you are looking at.

Currently this means:

  • if there՚s a DOI on the page, provide a SciHub link.
  • if your library(1) has the book you are looking at(2), provide a link
  • (1) For now, assuming your library is the San Francisco public, San Mateo public, or UCSF libraries. To be further generalized when I get around to it.
  • (2) Assuming the ISBN number appears on the page.

How

  • Chrome > Preferences > Extensions
  • Turn on Developer Mode
  • Load unpacked extension (point to the this directory)
  • Go to an Amazon book page or similar, you should see a popup in the lower-right corner
  • Note: if you run any privacy extensions (eg Privacy Badger from EFF) you may need to customize them or turn them off.

Why

There used to be a nice extension called BookBurrito that did something similar, but it seems to have vanished.

Notes

The Privacy Badger extension can interfere with the operation of the extension, but you can go set the appropriate domains to allowed (green) in its control window.

Testing

The source pages change their HTML layout fairly frequently, and this uses pretty naive regexs to try and detect results. Therefore, the configs need to change fairly often. Forunately there is a test jig.

cd test
./test.sh

This requires rhino.