greasemonkey scripts ported to Safari? June 10, 2010 8:13 AM   Subscribe

With Safari 5 supporting extensions that are very similar to greasemonkey scripts, I'm wondering if any existing MeFi-related scripts have been/are being ported over.
posted by adamrice to MetaFilter-Related at 8:13 AM (13 comments total) 1 user marked this as a favorite

Related: is there one page on the wiki that collects all the scripts? Sort of. Maybe someone who uses a lot of these scripts could flesh that out some?
posted by jessamyn (staff) at 8:23 AM on June 10, 2010


FWIW, I use Creammonkey, which is a port of Greasemonkey to Safari. Works fine in Safari 5. Actually, it seems to have improved support for some existing scripts- I had the MeFi Navigator script installed for a while even though it never worked. After installing Safari 5, it suddenly started working.

Bonus: No having to go through Yet Another Apple Walled Garden.
posted by mkultra at 8:30 AM on June 10, 2010


I've heard of creammonkey, but having extensions supported in Safari itself should obviate the need for that.

Also, as I understand it, Safari extensions are not part of any walled garden. Developers host them on their own sites and don't need Apple's imprimatur. I've already installed several that I found here.
posted by adamrice at 8:56 AM on June 10, 2010


I would add that I installed a bunch of greasemonkey scripts in Chrome months ago and they just started working a few days ago for some strange reason. Thanks Plutor!
posted by JohnnyGunn at 9:36 AM on June 10, 2010


"Creammonkey"? Seriously?
posted by DU at 10:00 AM on June 10, 2010 [2 favorites]


Can I just say…i LOVE this one so far AutoPagerize
posted by ShawnString at 10:48 AM on June 10, 2010


I'll port over any of my scripts on user request, but have unfortunately found that there remain various and sundry incompatibilities and bugs in script support outside of the gold standard of Greasemonkey+Firefox. Many scripts won't work in part or in toto and may need a complete rewrite. Unfortunately, cross-browser extension support is still pretty shaky even after a three years (maybe more) of different projects and attempts to make it seamless.

I'd take a stab at porting abandoned scripts from other authors on user request, depending on available time, effort, and the usual suspects.
posted by mdevore at 11:46 AM on June 10, 2010


adamricePoster: Also, as I understand it, Safari extensions are not part of any walled garden. Developers host them on their own sites and don't need Apple's imprimatur. I've already installed several that I found here.

Oh, that's cool! I guess the "benefit" of going through Apple is that they'll digitally sign it for you.
posted by mkultra at 11:54 AM on June 10, 2010


Also, as I understand it, Safari extensions are not part of any walled garden. Developers host them on their own sites and don't need Apple's imprimatur.

I don't think that's exactly true. This is just my understanding from what I've read, without trying any of this myself:

I believe Safari won't install extensions that haven't been digitally signed with a certificate issued by Apple. It's apparently really easy to get a certificate from Apple, as a bunch of developers have done it already. Seems like it's an automated process. With a certificate, you can sign whatever you want with it, but Apple could in theory invalidate your certificate if they decide a developer is misbehaving, and that would make future versions of Safari refuse to install all extensions signed with that developer's certificate. So it's sort of like a public park with a private security guard who can kick you out at any moment?
posted by scottreynen at 2:58 PM on June 10, 2010


I'd probably take a shot at porting over the one real Greasemonkey script I've written, except that I'm the only person who has downloaded it so far. Heh.

How similar is writing a Safari 5 extension to writing a Greasemonkey script, anyway? Is it a matter of cutting and pasting the code and doing a bit of editing? Or are we talking about more of a re-implement the functionality from scratch kind of thing?
posted by FishBike at 3:19 PM on June 10, 2010


Well, JavaScript, HTML, and CSS are supposed to be fully supported with extensions, so unless you lean heavily on GM_ specific functions--which you might be able to emulate or bridge within the script/extension code--it doesn't seem that you would need to write an existing script completely from scratch. Its internal logic flow should stay the generally the same unless the script is heavily tied to Firefox behavior. The new Safari browser-specific API (e.g. UI and storage items) appears deep enough to ease transition pain.

On the other hand, there are severe gotchas with Chrome that can require major workarounds or loss of functionality with GM scripts, and Safari may have similar issues. Probably does considering it's an initial release. Doesn't look like a script port will be a simple cut, paste, and run situation except for vanilla stuff. Of course, build, packaging, and install details are different from GM and Firefox.

I should play with it more, if I can think of anything I want in Safari. Problem being, I don't like or use Safari. Maybe that will change with the full-blown extension support.
posted by mdevore at 6:00 PM on June 10, 2010


I would add that I installed a bunch of greasemonkey scripts in Chrome months ago and they just started working a few days ago for some strange reason. Thanks Plutor!

Haha yes. The reason Plutor's scripts didn't work is they all load jquery as an external dependency. That either wasn't supported, or was broken. All is good now. Yay Chrome.
posted by cj_ at 7:54 PM on June 10, 2010


A handful of my most popular scripts (quote, deleted posts, maybe contact contributions?) have jQuery in-lined. I've ranted briefly about how Opera and Chrome's half-assed greasemonkey support really pisses me off, and I'd be happy if Chrome at least started supporting the @require directive. I keep meaning to write a longish blog post that I can point people to when they complain about non-Firefox support.

Can anyone confirm this for me? Searching Google for "chrome greasemonkey require" really isn't giving me any helpful info. It's at least one step in the right direction for making my life easier.
posted by Plutor at 11:43 AM on June 13, 2010


« Older Homebrew Swap!   |   Meta-Metafilter: a search for "Metafilter: " Newer »

You are not logged in, either login or create an account to post comments