This tool is a gadget. First install the Gadgets extension[1], then import it e.g. from
the English Wikipedia[2].
[1]
https://www.mediawiki.org/wiki/Extension:Gadgets
[2]
https://en.wikipedia.org/wiki/Special:Gadgets/export/ReferenceTooltips
--
Matma Rex