Hacker News new | ask | show | jobs
by lordgrenville 1613 days ago
Ooh, that's a lot simpler than my attempt to extract the DOI via regex (which is anyway not 100% possible because of the how flexible the DOI spec is...)

  javascript:location.href = 'https://sci-hub.se/' + document.getElementsByTagName('html')[0].innerHTML.match(/10\.\d{4,9}\/[-._;()\/:A-Z0-9]+/i)[0]