!7 static double delay = 1.0; // need 1 second hover before showing source code static JFrame frame; static Thread t; p-subst-autorestart { onLocalMechAppend("Mouse hovers", voidfunc(fS s) { //infoBox(s); bool off = jfind(s, "no longer") >= 0; cancelAndInterruptThread(t); t = null; if (off) ret; thread { sleepSeconds(delay); TextImageAction tia = jextractSerializedObject(s, TextImageAction); if (tia != null && isSnippetID(tia.toolTip)) { S text = loadSnippet_cached(tia.toolTip); if (nempty(text)) frame = showFrame(snippetWithTitle_rev(tia.toolTip), wordWrapTypeWriterTextArea(text), frame); } } }); }