“popups.js”, 2019-08-21 (; backlinks; similar):
popups.js: standalone Javascript library for creating ‘popups’ which display link metadata (typically, title/author/date/summary), for extremely convenient reference/abstract reading, with mobile and YouTube support. Whenever any such link is mouse-overed by the user, popups.js will pop up a large tooltip-like square with the contents of the attributes. This is particularly intended for references, where it is extremely convenient to autopopulate links such as to Arxiv.org/Biorxiv.org/Pubmed/PLOS/gwern.net/Wikipedia with the link’s title/author/date/abstract, so the reader can see it instantly.
popups.jsparses a HTML document and looks for<a>links which have thelink-annotatedattribute class, and the attributesdata-popup-title,data-popup-author,data-popup-date,data-popup-doi,data-popup-abstract. (These attributes are expected to be populated already by the HTML document’s compiler, however, they can also be done dynamically. Seewikipedia-popups.jsfor an example of a library which does Wikipedia-only dynamically on page loads.)For an example of a Hakyll library which generates annotations for Wikipedia/Biorxiv/Arxiv/PDFs/arbitrarily-defined links, see
LinkMetadata.hs.
View Javascript: