All posts tagged ‘Greasemonkey’

File Under: Software & Tools

Chrome Browser Sneaks Greasemonkey Under Hood

Those involved in testing Google’s Chrome browser found an unexpected surprise Saturday when a popular scripting tool, Greasemonkey, was included in the latest nightly builds of the browser.

Chrome developers still have some work to do before Chrome has a full Greasemonkey implementation, but soon enough, the integration will allow users to install scripts to enhance functionality and change the look of any web page.

It will also make a previously hacked Greasemonkey implementation, Greasemetal, obsolete.

At Chrome’s launch in September, when Google mentioned the company would be looking to add an extensions API, Chrome developers also gave the impression it would be a long-time in coming. In other words, they would have to develop it from scratch.

Building extensions into the browser one by one is another way to go, although it seems like a stop-gap solution at the moment. At this point we have Gears (formerly Google Gears) built into the browser, and now Greasemonkey. Of course, it’s probably no coincidence the original creator of Greasemonkey, Aaron Boodman, currently works at Google and added the implementation himself.

You can download the nightly build of Chrome, including the half-baked Greasemonkey implementation, for testing purposes at Chromium.org. Greasemonkey is currently available, and very popular, as an extension to Firefox and IE.

[via Google Operating System]

See Also:

Greasemonkey Shows Off Political Colors

Memeorandum colored by Greasemonkey script

Andy Baio, a prominent blogger and creator of Upcoming.org, has released a Greasemonkey script to visualize the perceived political bias of linked content on the political news aggregation site Memeorandum. If a site tends to link to more left-leaning stories, it’s colored blue. Right-leaning linkers are red.

With the help of Delicious founder Joshua Schachter, Baio used a recommendation algorithm to analyze the last three months of linking behavior for each news source. With that data stored in a Google Spreadsheet, Baio used the Ajax support in Greasemonkey to grab a JSON feed and colorize the links. Those with Firefox’s Greasemonkey extension and Baio’s script installed will see the colorized links when viewing Memeorandum. Baio also released a full-fledged extension that does not require Greasemonkey.

This is a great example of how Greasemonkey can be used to change the way you view a page. In Baio’s case, he wanted to see the perceived bias of a site at a glance so he could choose a balanced view. The code from this project is available under the free and open-source GPL license. You could use it to create other ways of visualizing data on the web.

GreasemonkeyIf you’re brand new to Greasemonkey, be sure to read my new Greasemonkey tutorial on the versatile Firefox extension. If you’ve ever written JavaScript before, you’ll quickly learn the ways of Greasemonkey, which essentially gives you the ability to insert your code anywhere in someone else’s site, but only for your own use on your local machine.

You don’t need to bite off as much as Baio, who admits this is his first Greasemonkey script. One of the biggest benefits I’ve found is that I can write code to pull out the important stuff already in the page. My tutorial shows a simple example of that, where I create a floating menu of all <h2> tags on the page. It turns out this is useful for long Wikipedia entries… and Webmonkey tutorials.

See also:

File Under: Software & Tools

Access Your Gmail Contacts From Any Site

greasemonkey.jpgGmail recently updated its contacts manager to be a little smarter and more useful, but webmail-based PIMs like the one in Gmail still have one huge drawback — filling in forms outside of Gmail.

For instance, say you’re on a site that has a “send to your friends” form and you want to pass something along via e-mail. Better hope you know all your friends’ addresses or you’re going to have to head into Gmail and start using some cut-and-paste trickery.

Or, you could install the Google Contacts Autocomplete Greasemonkey script.

The script creates a UI experience similar to what you get when filling in the “To” field in Gmail — autocomplete suggestions based on what you’ve typed — but enables that feature on any web form.

There are some drawback though. For instance, if you’re used to Google suggestions, which are ranked according to how often you e-mail a contact, you may find the Greasemonkey version lacking since it uses purely alphabetical sorting.

The other potential annoyance is with forms where you just want to enter your own e-mail address. Google Contacts Autocomplete will automatically make suggestions for every e-mail form, which might make it more annoying than useful.

Still, if you’ve been looking for an easy way to get e-mail address autocomplete outside of Gmail, Google Contacts Autocomplete fits the bill. Naturally you need to be using a browser that supports Greasemonkey for the script to work.

[via Google Operating System]

See Also: