Created
April 14, 2018 13:02
-
-
Save lamarqua/fe664d5f41039563147f8abfce4eff08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function()%7Bvar%20re%20%3D%20%2F10.%5Cd%7B4%2C9%7D%5C%2F%5B-._%3B()%2F%3AA-Z0-9%5D%2B%2Fi%3Bvar%20text%20%3D%20document.documentElement.textContent%20%7C%7C%20document.documentElement.innerText%3Bvar%20found%20%3D%20text.match(re)%3Bif%20(found)%20%7Bwindow.location.href%20%3D%20%22http%3A%2F%2Fsci-hub.tw%2F%22%2B%20found%3B%7D%7D)() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var re = /10.\d{4,9}\/[-._;()/:A-Z0-9]+/i; | |
| var text = document.documentElement.textContent || document.documentElement.innerText; | |
| var found = text.match(re); | |
| if (found) { | |
| window.location.href = "http://sci-hub.tw/"+ found; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment