Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 have some JavaScript bookmarklets that work on the selected text in a web page, but I'd like to be able to use them on the selected text in any Mac OS X app, not just browsers or things that provide browser-like views. Mac OS X has the "Services" (sub)menu where any app can publish services that it can provide to other apps, but I don't know how to make my bookmarklets show up as services there.

Is there a way to make JavaScript bookmarklets show up as Mac OS X "Services", or otherwise execute JavaScript against the selected text in any Mac OS X app?

share|improve this question
2  
That won't work because bookmarklets depend on the JavaScript APIs provided by the browser. To do this, someone would need to write a third-party application that implements the browser APIs on top of the operating system. I don't think this can be done natively, without a separate application. – Sasha Chedygov Jun 10 '10 at 22:10

I doubt you can do it without rewriting the JavaScript to something like AppleScript. If you can do that, then in 10.6 Snow Leopard you can use Automator to create a new "service". Such service can, for example, work on selected text, such as looking up something on Wikipedia.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .