views:

181

answers:

1

I'm using FF 3.5.3 on Windows Vista.

This is my (edited for shortness) bookmarklet:

javascript:(function(){
var text = window.content.getSelection().toString();
alert(text);
})();

Works, but not on gmail.com. Probably due to dynamicly generated content.

I'm aware of this workaround, but it only works for Firefox extensions.

+2  A: 

Gmail using frames. Try:

document.getElementById('canvas_frame').contentWindow.getSelection().toString();
NV
Great! That solved it!
jamting