# -*- coding: utf-8 -*- # Copyright: Ankitects Pty Ltd and contributors # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html from anki.hooks import addHook from anki.lang import _ def hint(txt, extra, context, tag, fullname): if not txt.strip(): return "" # random id domid = "hint%d" % id(txt) return """ %s
""" % (domid, _("Show %s") % tag, domid, txt) def install(): addHook('fmod_hint', hint)