clemente / Sci-Hub downloader

Hi!

Given that Sci-Hub is funded by donations, I think the script should not check if each article I visit is on Sci-Hub.

Sometimes I visit 10 articles, while trying to find the most relevant to what I'm looking for. But I only want to see one.

I think getDownloadLink should always return fallbackLink, and I modified my copy of the script to do so. That way, you don't even need it to be async:

function getDownloadLink(doiReference) {
    const fallbackLink = SCI_HUB_URL + "/" + doiReference;
      console.log("SciHub link:", fallbackLink);
    return fallbackLink;
}

Then, delete the await from const downloadLink = await getDownloadLink(doiReference);

Hello!
Thank you for your input. There are two reasons I did what the script does:

  • I save some loading time and some clicks (the button directly downloads the PDF)
  • I save even more clicks when the article is not available on Sci-Hub (the button does not appear)

I understand your concern but I think the user experience is more important. Your modifications work for you and this is perfect then :-)