I wanted to provide a way to hyperlink to the most popular page in the topic and the most popular topic on the site from within the gadget. However you can't use <a></a> tags. Instead you need to detect whether the mouse is positioned over the link text by watching its position.
First make an array of the text of links that need watching, along with their co-ordinates and length. We can use .measureText() to get the width of text rendered in a canvas.
Next we need to watch out for movement or clicks
And if they are triggered, see if we are over any links, and react if they are
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Fancy gadgets on Sites >