I am trying to save the most recent highlighted text on a webpage for use in my script. This will be done by listening for any "mouseup" event and when the selected text is not null it will be saved for later use. I can't find any way to achieve this.
I haven't been able to try anything since I'm new to chrome development.