Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

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

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