Created
July 22, 2014 15:05
-
-
Save bibstha/7ce2678d5b1d2a014b99 to your computer and use it in GitHub Desktop.
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
<a href="javascript:var l = document.location; new_href = l.origin + '.eaccess.ub.tum.de' + l.pathname + l.search; window.location.href = new_href">Access with TUM</a> |
Contains check for eaccess in url
<a href="javascript:(function(){
var l = document.location;
if (l.origin.indexOf('eaccess') == -1) {
new_href = l.origin + '.eaccess.ub.tum.de' + l.pathname + l.search;
window.location.href = new_href
}
})();">Access with TUM</a>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More readable version. Need to check if url already contains eaccess.ub.tum.de