Last active
September 25, 2020 10:00
-
-
Save kidmose/fcaa93706d8e7268f774 to your computer and use it in GitHub Desktop.
Bookmarklet that modifies the current url by appending a string: useful for accessing Aalborg University Library paid services from outside
This file contains 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
# Slices a string into the url: | |
# - from eg.: http://link.springer.com/chapter/10.1007/978-3-642-31217-5_19#page-1 | |
# - to eg.: http://link-springer-com.zorac.aub.aau.dk/chapter/10.1007/978-3-642-31217-5_19#page-1 | |
# - subdomains at target are eliminate by replacing `.` with `-` | |
javascript: (function() { | |
wl = window.location.toString().split("/"); | |
wl[2] = wl[2].replace(/\./g , "-") + ".zorac.aub.aau.dk"; | |
window.location = wl.join("/"); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment