News for hackers. Stuff that matters.
Re:Wait, What's a Bookmarklet? by egorpv on Wednesday October 25, 2023 @06:10PM (#38019010)
Same, but my version uses a different approach. It takes the selected (or entered via prompt) text, strip spaces and opens the sci-hub in a separate tab.

  javascript:  Qr = window.getSelection ? window.getSelection().toString() : document.selection.createRange().text; if (Qr) {     void(window.open('https://sci-hub.se/' + String(Qr).replace(/^\s+|\s+$/g, ''))); } else {     void(Qr = prompt('Enter URL/DOI to sci-hub it', ''));     location.href = 'https://sci-hub.se/' + String(Qr).replace(/^\s+|\s+$/g, ''); }

There are no comments on this comment yet.