Is it possible to write a Greasemonkey script to trigger the Ctrl+A (select all) action in Firefox? (after a new page is loaded if the script is enabled?)
Help me at any level possible for you.
Update:
"Firefox has got addons to speed read or read aloud selected text. I just wish to automate the part where text is to be selected."
I tried creating a new Greasemonkey script, typing the above code (which I grabbed and edited from this page), and loading a page.
It did select all the text, but for some pages, it becomes unselected immediately. For example, Google’s homepage, because the page focuses the search field.
Update by BA:
This didn’t work on Google because it’s fighting native scripts. But, by re-running the code at
onloadand again after, we can preserve the selection.Also, if the native script sets focus to an
inputortextarea, we must fight that.So, a Greasemonkey script that incorporates all these ideas, and seems to work is: