I wrote a couple of Zotero (https://zotero.org) plugins to solve some problems. First was to preview a citation in a tab.
The second is to fix line endings in abstracts, which seems to be a problem for me when I copy/paste from PDF files.
I was starting from scratch in learning how to do this, but basically copied some bits and pieces from other plugins. There was more than a little head-scratching. What was interesting to learn is that Zotero is a web page / application under the hood and so is basically written in JavaScript.