Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

There's the wonderful Greasemonkey to run user-defined JavaScript on web pages.

Is there such a thing as Greasemonkey for Safari? Or would one instead write a Safari Extension to customize behavior on other web pages? Maybe there's an alternative that runs on AppleScript instead of JavaScript?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Another option to run GreaseMonkey scripts is NinjaKit (which is what I use). It's a Safari 5 extension, which means it's just a tad safer than GreaseKit.

share|improve this answer
    
This seems like a good thing, but I can't find any documentation – and the one script I tried did not work (it works in Greasemonkey/Firefox; it's Facebook Autopoke) –  don el ka nal Jan 26 '11 at 17:37
    
@d'ombre - yeah, the author's Japanese, so the English docs are minimal. There's a little bit here which might be some help. So far as individual scripts go, most work, but yes, some don't. For FB, Unfriend Finder works for me, so it may just be an Autopoke issue. –  Dori Jan 26 '11 at 18:46
add comment

Is there such a thing as Greasemonkey for Safari?

You can use SIMBL and GreaseKit to run most Greasemonkey scripts in Safari, unmodified. Detailed installation instructions are found at this link, repeated here:

  1. Download and install SIMBL
  2. Quit Safari
  3. Download GreaseKit
  4. Drag the GreaseKit.bundle file to ~/Library/Application Support/SIMBL/Plugins. You may need to create this location if it doesn't exit
  5. Start Safari and you'll see a GreaseKit menu bar item
  6. Install scripts from http://userscripts.org -- the installation process is a little different from the Firefox approach, but it works.

Or would one instead write a Safari Extension to customize behavior on other web pages? Maybe there's an alternative that runs on AppleScript instead of JavaScript?

The native-to-Safari equivalent of Greasemonkey is AppleScript extensions and plugins. For a nice library of native Safari extensions check out Pimp My Safari.

share|improve this answer
    
SIMBL will force me to use 32bit Safari – anything that this causes problems with? –  don el ka nal Jan 26 '11 at 17:39
    
Have you tried NinjaKit (@Dori's suggestion)? It looks to be based on S5, so newer framework. –  Ian C. Jan 26 '11 at 18:13
add comment

The best place to start is probably going to be here: http://developer.apple.com/devcenter/safari/index.action

I've seen safari extensions whose only behavior was to customize behavior of web sites; just yesterday I saw one that changed the layout of reddit to be more iOS-friendly.

here it is.

share|improve this answer
add comment

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.