## Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

## Discussion Tag Cloud

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentRowNumber1.
• CommentAuthorScott Morrison
• CommentTimeMar 31st 2012
• (edited Apr 4th 2012)

Hi all,

I just wrote a little Chrome extension that automatically adds links back to the arXiv on mathscinet pages, when it can find the corresponding preprint. Could I recruit some beta testers here? (Unfortunately, it’s only available for Chrome right now, but it should be a piece of cake to do the same for Firefox and others.) You can get it directly via the Chrome store, at https://chrome.google.com/webstore/detail/fdcmpabkhcbadblfnhcnpdbpljdebkmi.

UPDATE This now works as a user script in most browsers. (Chrome, Firefox with Greasemonkey, hopefully others too.) You can get it directly from https://bitbucket.org/scottmorrison/arxiv-toolkit/raw/tip/src/main/js/mathscinet-extension/mathscinet.user.js.

Please let me know if you find articles which really should have a linked arXiv preprint, but don’t. I’ll check them out.

best regards, Scott Morrison

• CommentRowNumber2.
• CommentAuthorRodMcGuire
• CommentTimeMar 31st 2012

Is this a “real” Chrome extension or just a GreaseMonkey Script? I’ve had experience developing GM scripts for Firefox and I have heard that Chrome can load many GM scripts as extensions but I’ve never tried loading or developing GM scripts on Chrome.

My brief impression of what you are doing is that it would be a fairly minor GM script that could be compatible with both Chrome and FireFox. If you are not already doing this then that is probably the way to go. And then it could also be hosted in userscripts.org.

P.S. I installed that extension in Chrome. How do I tell that it is present and see its source.

• CommentRowNumber3.
• CommentAuthorCharles Rezk
• CommentTimeMar 31st 2012
This does not appear to do anything for me. On reflection this is probably because I'm at home, and have to access mathscinet through the university library's proxy server. So I access mathscinet using a different URL. Any way to trigger this extension manually?
• CommentRowNumber4.
• CommentAuthorScott Morrison
• CommentTimeMar 31st 2012

Hi Charles,

could you tell me the URL you use? It’s best if scripts like this are triggered by the particular URL of the page (otherwise they have to run on every page, and it’s a bit dodgy to run other people’s extensions on every single website you visit). I hadn’t realized that some people access mathscinet through alternative URLs — it seems indeed somewhat incompetent on the part of your library’s proxy administrators — proxies should handle this all under the hood.

• CommentRowNumber5.
• CommentAuthorScott Morrison
• CommentTimeMar 31st 2012
• (edited Mar 31st 2012)

Hi Rod,

it’s really just a little blob of JavaScript. I packaged it as a Chrome extension, because I use Chrome on a day to day basis. I’m pretty sure that I can package it as a Greasemonkey script, just by adding the appropriate headers. One requirement is that I need to be able to access jQuery, because I use that quite intensively in the script, and I’m not sure yet how to do that under Greasemonkey. I’m also hesitant to put it out as a Greasemonkey script right away, because I’m sure it will evolve further soon. The Chrome extension will automatically update for anyone who has installed it, while Greasemonkey scripts will quickly become obsolete.

To see that the extension is active, go to “Window”, “Extensions” from the Chrome menus. Unfortunately Chrome doesn’t readily let you inspect the internal details of the extension. On the other hand, it’s just some files on your hard drive. On my OS X system, I see my extension at /Users/scott/Library/Application Support/Google/Chrome/Default/Extensions/fdcmpabkhcbadblfnhcnpdbpljdebkmi/. (You can discover that nonsense character string from the Extensions menu mentioned above, if you turn on developer mode.) It’s also possible to look at the source before downloading — instead of clicking “Install”, right-click, “Save As”, rename the file from .crx to .zip, then just unzip the file.

• CommentRowNumber6.
• CommentAuthorScott Morrison
• CommentTimeMar 31st 2012
• (edited Mar 31st 2012)

Following up with Rod, the very latest version of Greasemonkey handles automatic updates, so I’m happy to try that. I worked out how to use jQuery from a Greasemonkey script (easy!) but unfortunately there’s a major piece of missing functionality. The XMLHttpRequest object, which scripts use to load other pages in the background (obviously needed for this application!) isn’t available from a Greasemonkey script. Greasemonkey instead provides its own alternative called GM_xmlhttpRequest. There’s some advice here on hooking up jQuery to use this alternative, but I think this is getting above my pay grade. If anyone wants to jump in and show me how to get this working under Greasemonkey, I’d be very happy!

• CommentRowNumber7.
• CommentAuthorCharles Rezk
• CommentTimeMar 31st 2012

Scott: our library tacks the URL of its proxy server onto the end of the original URL. So it’s something like: “www.ams.org.proxy.uillinois.edu” (not exact). From our library’s help pages:

If Your Network Has Its Own HTTP Proxy Server It should work in conjunction with the Library proxy server. Unlike a standard HTTP proxy server, the Library proxy presents web pages that appear to come from a normal web server. It does this by searching the content of the pages it retrieves on your behalf, and rewriting the URLs so they refer back to itself instead of the remote servers it proxies. Therefore, you should not change your web browser's proxy settings to use our service.

• CommentRowNumber8.
• CommentAuthorScott Morrison
• CommentTimeApr 1st 2012

Hi Rod,

I pretty definitively failed getting this to work as a GreaseMonkey script. Any chance you want to contact me by email, and offer some advice? scott@tqft.net

• CommentRowNumber9.
• CommentAuthorScott Morrison
• CommentTimeApr 1st 2012

Charles,

I could add an exception for your university, but it’s a bit annoying, as anyone installing the extension would have to see the exception. As I said, I think your library is doing it wrong!

• CommentRowNumber10.
• CommentAuthorHenry Cohn
• CommentTimeApr 1st 2012
• (edited Apr 1st 2012)

I think the proxy issue is pretty common. For example, MIT uses whateverURL.libproxy.mit.edu in exactly the same way Charles is describing. Is there any other proxy solution that doesn’t require messing with browser settings? (That’s not a bad solution in principle, but it’s a lot harder to remember for less technically inclined users, plus it doesn’t deal with the case when you are using someone else’s computer and they don’t want you changing their settings.)

How much flexibility is there in when the script runs? For example, could you run it on a URL iff it contains “ams.org” and “mathscinet” as substrings? That’s not perfect, but it should be close enough for all practical purposes, and it would deal with the proxies.

It would also be good to take care of the five mathscinet mirrors (like http://ams.rice.edu/mathscinet - see http://www.ams.org/errors/msn-mirrors.html for a list).

• CommentRowNumber11.
• CommentAuthorScott Morrison
• CommentTimeApr 1st 2012

Oof, okay, I hadn’t realized how widespread this issue was, nor had I known about the mirrors. I’ll investigate further. My initial attempt to use wildcards within the hostname were not successful. (This probably works differently for Chrome extensions, Chrome user scripts, and Greasemonkey user scripts, which all behave slightly differently.)

Has anyone actually successfully used the current extension? I’m actually very happy with it already, and interested in seeing if it’s useful to others.

• CommentRowNumber12.
• CommentAuthorScott Morrison
• CommentTimeApr 1st 2012

Hi Charles,

the Illinois library proxy instructions don’t seem to actually explain enough. Could you send me a few examples of the actual complete URLs you see while using mathscinet?

• CommentRowNumber13.
• CommentAuthorScott Morrison
• CommentTimeApr 1st 2012

Okay, the mathscinet mirrors and the MIT proxy should all work now.

• CommentRowNumber14.
• CommentAuthorNoah Snyder
• CommentTimeApr 1st 2012
Columbia is also stupid about not using proxies. This is infuriating in general, and more specifically means that outside links to any closed resource don't work.
• CommentRowNumber15.
• CommentAuthorScott Morrison
• CommentTimeApr 2nd 2012

Wow, Noah, I hadn’t thought of that. That’s really pathetic! I don’t see how it is harder to once enter your proxy configuration information (it’s just a single URL to copy and paste in your computer’s settings!) than to rewrite URLs by hand all the time.

• CommentRowNumber16.
• CommentAuthorNoah Snyder
• CommentTimeApr 2nd 2012
Now imagine trying to use google scholar. Once you find the journal article, you then have to go back and find the "Columbia eResource" which covers that journal, and then you have to search that all over again in order to find the article.
• CommentRowNumber17.
• CommentAuthorKevin Walker
• CommentTimeApr 2nd 2012

A work-around which does not require any sort of sensible behavior from your library:

1. ssh -D9292 your-user-name@math.your-university.edu

(leave the shell session open in a terminal window)

2. Firefox > preferences > advanced > network > settings… > manual proxy configuration; then SOCKS Host: 127.0.0.1 Port: 9292

In other words, if you have a shell account at a computer on your university’s network, you can set up an SSH tunnel and then use localhost (127.0.0.1) as a SOCKS proxy in your browser.

• CommentRowNumber18.
• CommentAuthorKevin Walker
• CommentTimeApr 2nd 2012

@Scott: Instead of hard-coding a list of domains into your extension, would it be possible to include a button/key-combination/menu-item which says “Add this domain (or maybe the domain of the current URL) to the list of domains on which this extension will run”? Maybe the local list of custom domains can even be stored persistently.

• CommentRowNumber19.
• CommentAuthorScott Morrison
• CommentTimeApr 2nd 2012
• (edited Apr 4th 2012)

@Kevin,

I’m not sure. The mechanism I use at the moment is certainly hardcoded in. The problem is that Chrome asks the user for permission to install extensions, and lists the websites on which the extension will run, at install time, as a security measure.

I think the right solution is to make this a “user script” (e.g. for Greasemonkey or Chrome’s user script mechanism) rather than an actual extension. Then it will work for many more browsers, and there’s an existing straightforward mechanism for the end user to modify the sites user scripts run on.

The remaining hurdle is just that at the moment I use jQuery’s interface for making HTTP requests in the background, and this isn’t compatible with Greasemonkey (or Chrome’s emulation of the Greasemonkey environment). It should just be a matter of working out the syntax for doing background HTTP requests in a user script, and replacing my jQuery calls (e.g. $.get and $.ajax on lines 38, 52 and 65 of https://bitbucket.org/scottmorrison/arxiv-toolkit/src/tip/src/main/js/mathscinet-extension/mathscinet.user.js). And then hoping that it works as a plain user script after that …

• CommentRowNumber20.
• CommentAuthorScott Morrison
• CommentTimeApr 4th 2012

All fixed, it now runs as a plain user script in Chrome and Firefox (with Greasemonkey), and possibly others. You can get it directly from https://bitbucket.org/scottmorrison/arxiv-toolkit/raw/tip/src/main/js/mathscinet-extension/mathscinet.user.js.