ST|AG: simplify the tooltip JS