arwankhoiruddin / scihubsearch

A chrome extension to search scientific document from sci-hub just by right click and selecting the DOI
MIT License
36 stars 9 forks source link

let user custom Sci-Hub url #4

Closed dongzhuoer closed 6 years ago

dongzhuoer commented 6 years ago

Sci-Hub domain name often changes. Instead of update url after a new release, it may be more convenient to let user specify their favorite url, like what Sci-Hub Links supports. For instance, someone may want to use http://scihub22266oqcxt.onion.link/

arwankhoiruddin commented 6 years ago

Good idea. Will work on that

dongzhuoer commented 6 years ago

Thanks! Look forward to your next release.

cossio commented 6 years ago

This is a good idea. For example at this moment the domain sci-hub.bz is not working anymore for me, so I had to use https://www.sci-hub.tw/. It would be nice if I could set the extension to do that. No fancy interface required, perhaps just a text file that we can edit with the sci-hub domain URL.

cossio commented 6 years ago

By the way there is a simple hackish way to do this, no fix required. This could be a temporary solution.

  1. Remove the extension from Chrome.
  2. Download this repo as a .zip. Edit main.js, replacing sci-hub.bz with whatever domain needed.
  3. Go to Extensions in Google Chrome, and with Developer mode enabled, click Load Unpacked Extension, and select the folder where this repo was downloaded.

That's it.

cossio commented 6 years ago

Actually, there is no need to remove the extension from chrome. Just find where main.js is located and edit it, then restart chrome.

cossio commented 6 years ago

Use this prefix URL:

https://whereisscihub.now.sh/go/

it automatically redirects to a working Sci-Hub domain.

arwankhoiruddin commented 6 years ago

Thanks for your input @cossio . I have updated the source code based on your input. Enjoy!