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?

link|improve this question

50% accept rate
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
feedback

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.