Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to copy highlighted text from a certain site into an output folder on my Desktop. I know there are scripts that can copy highlighted text via JavaScript but I've only seen them for copying highlighted text on the particular website where your JavaScript is being executed.

Say I highlighted text from is there a way to run a script from my terminal and have that text copied and pasted into a folder that I specify on my Desktop?

share|improve this question

migrated from May 24 '11 at 6:04

This question came from our site for professional and enthusiast programmers.

Nah unless you overwrite the "highlight" event in your browser's code.

share|improve this answer
And im assuming that's probably a pain in the ass? – Anonymous May 24 '11 at 1:58

You can execute javascript directly through the address bar in your browser by typing "javascript:" and then the code. That would work on any website and it should run with enough rights to create files etc.

share|improve this answer
Not true. JavaScript executed in the address bar runs in the page currently being viewed. Content pages and JavaScript URIs cannot access local files. – Anonymous May 22 '11 at 22:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.