I wrote an addon to open GoldenDict when I selected a word.
def showAnswer(card):
# showInfo(card)
mw.web.eval("""
function lookup() {
var txt = "";
if (window.getSelection) {
txt = window.getSelection();
}
if (txt == "")
return;
if (String(txt).length>20)
return;
window.location.href = "gdlookup://localhost/" + txt;
window.getSelection().empty();
}
var x = document.getElementsByTagName("body")[0];
x.onclick = function () {
lookup();
}""")
Now I want to also search this word in anki’s browser. Where can I call something like aqt.dialogs.open("Browser", self.mw, search=(SearchNode(...),))
?