Bookmarklet for the UofT Library Get it! Service
If you are anything like me, you might click onto an interesting article from ResearchGate or a Google Scholar Alert when you are at home, only to find yourself at a publisher paywall, with no easy way to login to the UofT MyAccess (a.k.a. “Get it! UTL”) service. Instead of returning to the library webpage or to Google Scholar to tweak your libraries preferences, you can easily get the paper by sticking the URL into the MyAccess proxy service^[Note that the proxy will often return a 404 error if you are not on a known publisher page.]. To make this easier, just drag the bookmarklet, below, to your bookmarks toolbar. Then you will be able to click the bookmarklet to instantly be taken to the MyAccess login page.
If you can’t drag and drop the bookmarklet, create a new bookmark, and use the following as the URL:
javascript:(function(){var%20url=document.URL;url=url.split("/");var%20path="";for(i=3;i<url.length;i++){path+="/"+url[i];}target="http://"+url[2]+".myaccess.library.utoronto.ca"+path;window.open(target,"_self");})();
UPDATE: As luck would have it, the fine folks at the UofT library beat me to the punch a long time ago.
The “official” bookmarklet code is as simple as:
javascript:void(location.href=%22http://myaccess.library.utoronto.ca/login?url=%22+location.href)
As it turns out, all of the URL splitting and re-arranging in my bookmarket is handled by the proxy server itself!