I am looking for a way to select text on a website in Chrome and have a overlay/tooltip pop with content depending on the text selection.
Has anyone done this before or knows from the top of their heads how to make the toolip pop-up?
Much appreciated.
All you need to do is listen for mouse events:
For example, this might help you get started. More tweaks are needed, to figure out if you initiated the selection from down->up, right->left, etc (all directions). You can use the following code as a startup:
contentscript.js
contentscript.css
manifest.json
Change the matches portion to the domain you want to inject these content scripts.
If you want to style it to look like a bubble, Nicolas Gallagher did some awesome CSS3 demos for bubbles!