10
$\begingroup$

A few years ago I working with zbMath to create a better interface for our Citation Helper that will allow us better flexibility in formatting and creating links to references.

At the time, SE was happy for me to modify the existing script and reintegrate it, however, as this was not on the top of my to-do list, time had gone by and SE has put that project on hold from their end.

However, this doesn't mean that we shouldn't use this feature that is so much better, and with their blessing I'm releasing this as a Userscript.

1. What is a Userscript?

A userscript is a piece of Javascript code that runs on selected websites (in this case, MathOverflow and Mathematics StackExchange, and in neither case the meta website is not included), usually through an extension. I personally use Tampermonkey, but other extensions are out there I'm sure.

2. Is it safe?

Yes. You can read the code, it is not very complicated overall, and it is essentially just a modification of the code that is already running through the default MathOverflow website to work with the new zbMath server.

3. Will the Citation Helper not work otherwise?

If you choose to not use this userscript, the Citation Helper will work as it did until now, using the older version. You may find, however, that some of the citations are not complete, not as nicely formatted, or do not have links to the paper.

All of these are features that were addressed in this new version.

4. Okay, you've convinced me. Where do I sign up?

You can find the script at https://karagila.org/CH2.user.js and if you're using Tampermonkey or a similar extension, it will recognise immediately that this is a userscript and offer you to add it to your browser.

If you have not changed the default settings, you will receive updates automatically if there are any bugs to be fixed.

5. How do I know that the script is working?

There are several indicators in place:

  • If you hover your mouse over the "Insert citation" button, it will say that this is version 2.0.
  • If you click the button, in the search window it will say "Insert citation 2.0".
  • The citation formatting will include arXiv links when available, and the formatting will generally be different.
  • There will be a line in the console telling you that you're running the script.

6. That's great, where do I report bugs?

You can leave a comment here, if you find a bug, and I will get in touch with you if I need to get more details. Please make sure that the bug is a bug in the script (e.g., a malformed citation) rather than a problem with Tampermonkey or your browser permissions.

$\endgroup$
5
  • $\begingroup$ I'm running the userscript on Firefox on Ubuntu 24.04 with Firemonkey, and I get this error: Failed to insert - Can't access property "citationHelper", StackExchange is undefined. $\endgroup$ Commented 17 hours ago
  • $\begingroup$ After the page has loaded window.StackExchange.citationHelper is defined; I suspect the problem is that FireMonkey tries to access the variable before the scripts that create it have a chance to run. $\endgroup$ Commented 17 hours ago
  • $\begingroup$ @FedericoPoloni: that's strange. My understanding is that userscripts run last, after the page was loaded. It seems like you might have limited the access of FireMonkey to local variables? $\endgroup$ Commented 15 hours ago
  • $\begingroup$ I don't think there is even an option to do that, the "settings" page has like 3 choices. But I'll investigate more... in the meantime thanks for your work in creating this script. $\endgroup$ Commented 15 hours ago
  • $\begingroup$ I'll try to find the time to install Firefox and FireMonkey and do some testing. $\endgroup$ Commented 14 hours ago

1 Answer 1

7
$\begingroup$

Thank you @Asaf for this very valuable contribution!

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.