Giter VIP home page Giter VIP logo

roiarthurb / side-auto_sci-hub Goto Github PK

View Code? Open in Web Editor NEW
242.0 10.0 15.0 940 KB

Cross-Browser Plugin to open Sci-Hub πŸ— page with the article from your current tab

Home Page: https://roiarthurb.github.io/Side-Auto_Sci-Hub/

License: GNU General Public License v3.0

JavaScript 66.70% HTML 33.30%
firefox-addon sci-hub sci-hubextension chrome-extension chromium-extension brave-extension side-project scihub

side-auto_sci-hub's Introduction

Auto Sci-Hub Auto Sci-Hub Logo

Language GitHub Auto Release

Maintenance

Available on addons.mozilla.org

Don't respect Mozilla's rules πŸ˜’

View report mail Dear contributor,

We received a notification under Mozilla’s Digital Millennium Copyright Act (β€œDMCA”) and Trademark policy (https://www.mozilla.org/about/legal/report-infringement/) complaining of allegedly infringing activity by you on our service at https://addons.mozilla.org/en-US/firefox/addon/auto-sci-hub. We have removed or disabled access to your add-on identified by the claimant as infringing the claimant's trademark.

The notice included the following report:

From DeVore & DeMarco LLP:

We are litigation counsel for Elsevier Inc., a leading publisher of scientific, engineering, and medical books and journals. Elsevier provides , among other things, the ScienceDirect platform, through which it distributes scientific journal articles in which it holds the copyright. In order to protect its copyright interest in those articles, Elsevier brought a civil action against a number of websites commonly known as "Sci-Hub" and "LibGen" or "Library Genesis" and their respective mirrors which engage in the large-scale infringement of those copyrights. On June 21, 2017, Elsevier obtained a judgement against those websites which, among other things, enjoined the websites, their operators, and anyone acting in concert with them, from infringing Elsevier' s copyrighted works or assisting others in doing so.

We write to inform you of the presence of a number of add-ons for the Firefox web browser which are designed specifically to assist their users in infringing Elsevier 's (and other publisher') copyrights through the websites operated by the defendants in the above-mentioned civil action. We request that these extensions be removed from the Firefox Browser Add-Ons website (addons.mozilla.org) because they (1) violate the DMCA, including Section 1201 (circumvention of copyright protection systems); (2) operate in concert with the defendants in the above-mentioned civil action to violate Elsevier's copyrights in violation of the court 's order enjoining such conduct; and (3) are manifestly in violation of Mozilla's Conditions of Use (https://www.mozilla.om:/enUS/about/legal /acceptable-useD which expressly prohibit, among other things, illegal content and content which violates the copyright or other intellectual property rights of others. We therefore request that the following add-ons be promptly removed.

Available on chrome.google.com

Don't respect Google's rules πŸ˜’

View report mail Dear developer,

Your Google Chrome item "Auto Sci-Hub" with the ID nlogbpfgpkffmombiknfdoogphkimmmd did not comply with our rules and has been removed from the Chrome Web Store.

Your item did not comply with the following section of our Program Rules :

"Content Rules"

  • We do not authorize products or services that facilitate unauthorized access to the content of websites that bypass paywalls.

Once your item complies with the Chrome Web Store rules, you will be able to request that it be republished on the Chrome Web Store Developer Dashboard. Before publishing it again, we will check if it is compliant.

Please respond to this email if you have any questions about its content. The Chrome Web Store Developer Support team will contact you to follow up on your request.

Important Note :

Repeated or harmful non-compliance with the Chrome Web Store rules can lead to suspension of your developer account or banning from using the Chrome Web Store platform.

It may also lead to the suspension of related Google services associated with your Google Account.

Sincerely,

Chrome Web Store Developer Support

Available on Github release

Check the doc (quick link here) to see how to simply install on your browser 🐻

Background

I was tired to copy the URL of pages to paste it in Sci-Hub website 100 times per hours while I was reading scientific papers.

So I've created a very simple button addon for Mozilla Firefox which do it all for me.

Installing

Firefox

View contents
  1. Download the .xpi file from the latest release
  2. Click the Continue to install pop-up button
  3. Enjoy the plugin bear

Chrome/Chromium

View contents
  1. Download the .crx file from the latest release
  2. Open the chrome://extensions/ link
  3. Enable the Developer Mode
  4. Drag and drop the downloaded crx file in the browser window
  5. Click the Add extension pop-up button
  6. Enjoy the plugin bear

Zip developper install (hard mode)

View contents

Firefox

Open the debug page on the addon section

about:debugging#addons

Depending on your version of Firefox, this link may redirect you somewhere else. e.g. Ff 71 => about:debugging#/runtime/this-firefox

From that webpage, press the bug button Load Temporary Addon-On... and choose the manifest.json.

Chrome/Chromium

  1. Download and extract the latest zip from https://github.com/RoiArthurB/Side-Auto_Sci-Hub/releases
  2. Delete _config.yml from the folder (Chrome doesn't like reading files starting with _ for some reason but this file is for the GitHub Pages site so removing it isn't an issue)
  3. Go to Chrome's extensions page, enable Developer Mode
  4. Click Load unpacked, and select the extracted zip folder.

You'll also need to right click the Open in Sci Hub toolbar icon now, click Options, then change the URL to another Sci-Hub mirror because whereisscihub.now.sh is down.

Also, as written above, the plugin is not (and will never be) on the chrome store because it doesn't respect it's policy

Prohibited Products:

We don't allow products or services that:

  • Facilitate unauthorized access to content on websites, such as circumventing paywalls or login restrictions
  • Encourage, facilitate, or enable the unauthorized access, download, or streaming of copyrighted content or media
  • Mine cryptocurrency

How to use

Firefox addon button

Go on scientific page with PDF hidden behind a paywall, click on the Auto Sci-Hub button, and Sci-Hub will pop up with your PDF on another tab πŸ˜€

Before After
Before screen After screen

Context Menu

If you right click on a link, you'll see in the contextual menu a line to open to location of that link in sci-hub.

It's also possible to do the same by right clicking anywhere on the webpage. In that case it will open the current web page on sci-hub.

Link Page
contextual link contextual page

Options

Also, from the version 2.0, you're now free to choose your how redirection. That way you're able to use a raw IP address, your own instance of WhereIsSciHub, or whatever you want πŸ˜€

ASH option view

Built With

FYI - The plugin currently use a fork fixed of the official WhereIsSciHub, Vinni (the author of that tool) can't update his version now so I'm using a fork to have a working plugin ! :D

Authors

Contribution

  • Giacomo Rossetto - Upgraded almost everything - Jackymancs4
  • clef - Helped for the Firefox signing release - Clef-0

License

This project is licensed under the GPL 3 License - see the LICENSE.md file for details

Acknowledgments

PS: If the plugin is not available on markets anymore, it must be due to the fact that it doesn't respect Market Policy, so build it from source (it's a very simple plugin based on JS API, so it should work on any browser version) and enjoy the plugin ! πŸ˜€πŸ˜€

PPS: If you love Sci-Hub too, support the project by sending a contribution to the Sci-Hub Bitcoin address: 12PCbUDS4ho7vgSccmixKTHmq9qL2mdSns (check if it hasn't changed before giving ;) )

side-auto_sci-hub's People

Contributors

clef-0 avatar imgbotapp avatar jackymancs4 avatar roiarthurb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

side-auto_sci-hub's Issues

Cannot change the base URL

Describe the bug
I cannot change the base URL. Denmark has recently started blocking the Swedish and the Taiwan domains (.se, .tw), but the .shop one works. So I want to use that.

To Reproduce
Steps to reproduce the behavior:

  1. Go to extension preferences
  2. Click on enter any url (e.g. http://sci-hub.shop/)
  3. Click save
  4. Nothing happens, it keeps using the old one which results in waiting forever sense .se domain is blocked

Expected behavior
I expect it to use the new base URL

Screenshots
Screenshot from 2020-01-30 15-30-36

Desktop (please complete the following information):

  • OS: Linux Mint
  • Browser Firefox
  • Version 71.0 (64-bit)

How to install it on Chrome?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Not working for ACM Digital Library (dl.acm.org) links

I don't really know whether to post this issue here or on whereisscihub project, since it is used to get redirected to the actual sci-hub page, but I'll explain briefly.

Since ACM DL website uses a GET parameter to identify articles on their website (example: https://dl.acm.org/citation.cfm?id=2803202 ), where using whereisscihub to be redirected on the current sci-hub location the GET parameter doesn't get forwarded to the actual sci-hub webpage.

Steps to reproduce the issue

  1. Open any paper page hosted on ACM DL website (you can take the link in the example above)
  2. Use the extension button
  3. Get redirected to whereisscihub website (in the previous example it took me to https://whereisscihub.now.sh/go/https://dl.acm.org/citation.cfm?id=2803202 )
  4. Get redirected automatically to https://sci-hub.se/https://dl.acm.org/dl.cfm , regardless the paper you requested (sci-hub base url may be different depending on which version is used by whereisscihub).

PS: I am currently using Firefox as browser. Don't know if this issue applies to other browsers.

Lost a "h" in the prefix "https"

Describe the bug
Click auto sci-hub on every link will give a wrong url, which loses a leading "h".

To Reproduce
Steps to reproduce the behavior:
If you click auto sci-hub in latest firefox:
https://www.sciencedirect.com/science/article/abs/pii/S0927050789010054
The url in new tab is
https://sci-hub.se//ttps%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fabs%2Fpii%2FS0927050789010054
without a leading 'h'.

Expected behavior
The url in new tab should be
https://sci-hub.se//https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fabs%2Fpii%2FS0927050789010054

Screenshots
If applicable, add screenshots to help explain your problem.
Snipaste_2020-01-07_20-01-52

Desktop (please complete the following information):

  • OS: Windows 10 1909
  • Browser : Firefox
  • Version : 71.0 (64-bit)

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.

Put new tab next to current tab

I sometimes use this extension while I have a lot of tabs open, but (in Firefox at least), the new tab opened by clicking the extension icon appears at the end of my tab list instead of after my current tab. Putting the Sci-Hub tab directly after the tab that spawned it would keep relevant tabs next to each other and would be more consistent with Firefox's Open Link in New Tab.

[DISCUSSION] Page Action v Browser Action

@Jackymancs4 I'm wondering about the choice of Page Action v Browser Action... πŸ€” πŸ€”

I mean, it looks absurd to have the plugin as a page action if it apply on every page.. It turns to be a Browser action finally, or in my sense it does πŸ€”

I wanted to have your point of view on that, what do you think?

Firefox Android, Sci-Hub opens in a non-Private tab while in Private Browsing

Describe the bug
When pressing Open in Sci-Hub while in a Private Browsing tab on Android, it opens in a non-Private tab.

To Reproduce
Steps to reproduce the behavior:

  1. Load a journal article page in Private Browsing on Firefox Android
  2. Open menu and click Open in Sci-Hub

Expected behavior
Sci-Hub opening in a Private Tab next to the current one.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S10+
  • OS: Android
  • Browser: Firefox
  • Version: 68.4.2

New Tab Url Incorrect

Auto SciHub on Firefox 71 Windows 10

on this site https://science.sciencemag.org/content/366/6464/447 if you click AutoSciHub icon in Firefox it will attempt to open in a new tab

https://sci-hub.se//ttps%3A%2F%2Fscience.sciencemag.org%2Fcontent%2F366%2F6464%2F447

This url is incorrect since it is missing the h in https and the page will not open.

Describe the bug
A clear and concise description of what the bug is.

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.

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.

Wrong URL

Describe the bug
Hello,
I just would like to report a bug occuring in my case.
When i click on the addons, the new tab opens well, but it does not work because it is missing a "h" to the URL:
For example:
"https://186.2.163.90//ttps%3A%2F%2Fwww.sci etc.."

I do not know if this is normal? What should I do to solve this problem?

image

Thank you a lot for this great addons! and in advance for your reply

Corrupted SVG makes Chrome install impossible

Describe the bug
@Jackymancs4 The SVG is corrupted and Firefox give me some warnings about it and the plugin is impossible to install on chrome because of the SVG file...

I don't know how it works so can you help me with it?
The screenshot below is the firefox message (it's not much but it's all what I have) ^^"

Screenshots
image

Desktop (please complete the following information):

  • Browser Chrome & Firefox
  • Version 1.3

Some complex URL are not understood by SciHub with current encode

https://chrome.google.com/webstore/detail/auto-sci-hub/nlogbpfgpkffmombiknfdoogphkimmmd

This is a wonderful tool. But it cannot work in my chrome browser. When I click the extension of 'Auto Sci-hub' at the pape of one paper, the URL of this paper cannot be modified to DOI and hence, this paper cannot be downloaded.

For example, when I click this extension at the page https://www.osapublishing.org/ol/abstract.cfm?uri=ol-37-3-353, I only get this message 'Journal article not found. You can browse or search our database of articles.' However, if I use the DOI of this paper at sci-hub.se, this paper can be downloaded.

So it seems that the URL cannot be modified to DOI by this extension.

Other way to publish/auto-update plugin ?

From @Clef-0

As an aside, for Firefox users, it looks like you can submit addons to AMO to be signed without listing them on AMO (see 'How do I get my add-ons signed if they are not hosted on addons.mozilla.org (AMO)?'), which would let you auto-update the addon outside of AMO and let users install it non-temporarily, and it appears to be an automated review process that they claim won't be used for copyright enforcement. I don't use AMO, so I don't know the details, but their instructions sound pretty straight forward and it would be make the addon convenient for Firefox users again.

Auto close current tab

Hi,

The extension is useful, but I always have to manually discard the tab from where it is launched. I think an useful improvement would be to add a checkbox option in the preferences, allowing one to open the link in scihub and also auto-close the current tab with a single click. Another way of doing it would be to simply load the sci-hub page in the current tab.

Thanks for your great plugin.

Update Chromium install process

[GOT FROM MAIL] @shanelindsay

Hi

I could run your sci hub plug in on Chrome as it is disabled when installed from the .crx file:

"This extension is not listed in the Chrome Web Store and may have been added without your knowledge"

However, I got it to work with some google fu

  • open crx using a zip program and unpack
  • change folder name to remove _ (as Chrome doesn't like it)
  • remove _ from config.yml (as Chrome doesn't like it)
  • install as unpacked extension

(see truedread/netflix-1080p#68 for how I figured this out)

So perhaps worth adding these instructions on your page here https://github.com/RoiArthurB/Side-Auto_Sci-Hub to get round this (and change file/folder names if possible).

Thanks for the extension!

Best wishes,

Shane

[DISCUSSION] Integrate WISH link autodiscovery code in the extension

Hello @RoiArthurB
I've been following the recent updates and discussions.

I was wondering if you can consider to do (or accept a PR that does) what the title says.

Technically speaking, including and adapting this

async function getUrls() {
  const sciHubId = 'Q21980377';
  const officialWebsiteProperty = 'P856';
  const sparql = `
    SELECT ?urls WHERE {
      { wd:${sciHubId} p:${officialWebsiteProperty} [wikibase:rank wikibase:PreferredRank; ps:${officialWebsiteProperty} ?urls]. }
    }
    `;
  const response = await fetch(`https://query.wikidata.org/sparql?format=json&query=${encodeURIComponent(sparql)}`);
  const data = await response.json();

  const urls = data.results.bindings.map(result => result.urls.value);

  return urls.sort(compareUrls);
}

function compareUrls(url1, url2) {
  // URL beginning with `https://`, and ending in a non-digit character (of the TLD) and a potential trailing slash
  const httpsDomainRE = /^https:\/\/(.*)\D\/?$/;
  // URL beginning with `http://`, and ending in a non-digit character (of the TLD) and a potential trailing slash
  const httpDomainRE = /^http:\/\/(.*)\D\/?$/;

  // Regular URL's pointing to an HTTPS address come first
  if (httpsDomainRE.test(url1)) {
    return -1;
  } else if(httpsDomainRE.test(url2)) {
    return 1;
  // IP addresses using HTTPS come second
  } else if(url1.substr(0, 5) === 'https') {
    return -1;
  } else if(url2.substr(0, 5) === 'https') {
    return 1;
  // Only then come regular domains hosted through naked HTTP
  } else if(httpDomainRE.test(url1)) {
    return -1;
  } else if(httpDomainRE.test(url2)) {
    return 1;
  }
  // And if both are an IP address through naked HTTP, we don't care which comes first:
  return 0;
}

taken from https://gitlab.com/Flockademic/whereisscihub/blob/master/index.js

From what I understand from here you already considered it.

The problem is that if I explicitly gather SH URLs in the plugin I'm afraid to not respect the Firefox's rules and having my plugin being struck :/

I think this is not a real problem, mainly because from a functional standpoint, what you would already do is redirect to sci-hub, just with a middle step.

Also, on the market there are other Sci Hub related extensions (namely https://addons.mozilla.org/firefox/addon/open-on-sci-hub) that literally hard-code the URLs and have been around for quite some time.

Right now, you are quite reliant on the maintenance of whereisscihub (even when the option-thing will be released, which is a great idea, someone will have to keep the code working and consistent the actual behaviour).

This idea should give you quite some independence, and relieve you from the burden of also maintaining server-side whereisscihub forks (which you are doing now).

Dev for Pale Moon browser πŸŒ•

From mail :

Name: Anon
Email: [email protected]

Message:
Dear Arthur!
At first, thank you for your "Auto Sc-Hub" extension, it is really musthave stuff. Unfortunately, now Mozilla is not what it was before & I think that Pale Moon is a good choice now. But it doesn't support WebExtensions. It will be great, if in future you can add PM-version of addon in your / or PM repository. Now there are no anyone Sci-Hub add for PM, it's sadly.
Best wishes!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.