12

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?

5 Answers 5

7

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.

3
  • 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) Jan 26, 2011 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, 2011 at 18:46
  • Repository no longer exists :( Feb 9, 2022 at 13:56
4

I use TamperMonkey and it works surprisingly well. It's also a Safari Extension.

I have tried used NinjaKit in the past but it no longer works for me, a lot of scripts simply won't work.

1
  • $1.99 - seems like they don't believe in donations when it comes to Safari.
    – Yar
    Apr 18, 2022 at 6:15
2

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.

2
  • SIMBL will force me to use 32bit Safari – anything that this causes problems with? Jan 26, 2011 at 17:39
  • Have you tried NinjaKit (@Dori's suggestion)? It looks to be based on S5, so newer framework.
    – Ian C.
    Jan 26, 2011 at 18:13
2

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.

0

If you don't want to pay $2 for Tampermonkey, you can try Userscripts, which is free.

Userscripts is simpler, you will have to add your scripts using the extension page instead of installing them from GreasyFork automatically, for example. But otherwise it does the job of CSS and JS customisations as well. See the documentation of Userscripts for more information.

Mind that you won't be able to install extensions, which tamper with input devices, in recent versions of OSX. After the installation from the App Store you will have to enable them in the safe mode - after restarting holding the Shift key down. See an article at Apple about it.

You must log in to answer this question.

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