Keyvan Minoukadeh

7 October 2008

Greasemonkey + jQuery

Filed under: General — Keyvan @ 6:51 pm

It used to be difficult to combine Greasemonkey and jQuery (or any other javascript library). Looking into it again, I came across 3 methods and this comment from Stephan Sokolow:

For the record, the newest Greasemonkey versions should now provide a much better alternative to this.

See http://wiki.greasespot.net/Metadata_block#.40require for an example of how to efficiently load jQuery from the Google AJAX API … at userscript install time via the @require metadata key.

It really is very simple now—an example from the page linked aboved:

// ==UserScript==
// @name          Hello jQuery
// @namespace     http://wiki.greasepot.net/examples
// @description   jQuery test script
// @include       *
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// ==/UserScript==

$(document).ready(function() {
	$("a").click(function() {
		alert("Hello world!");
	});
});

And here’s a script I wrote which takes the top 100 movie torrents from The Pirate Bay and adjusts the size of each link based on its IMDB rating:

before and after comparison of The Pirate Bay

Install the Greasemonkey script and visit The Pirate Bay’s Top 100 Movies page to see it in action. You can also view the source.

27 September 2008

Critical Mass Gothenburg

Filed under: General — Keyvan @ 5:36 pm

cyclists on the road

Photos from yesterday’s Gothenburg (Göteborg) Critical Mass event are up in the gallery. I’ve also put together a video of yesterday’s ride - see below.

If you’re in Gothenburg, the ride starts at 6pm on the last Friday of every month at Gustav Adolfs Torg. If you’ve never been on a Critical Mass ride, read more about it.

Music by Jenny Wilson (via Jyoti)

8 August 2008

Exhibition Photos

Filed under: General — Keyvan @ 1:53 am

Disciplined Minds

Earlier in the year, I exhibited 3 of my photos at the Islington Arts Factory in London, UK, as part of a collective exhibition organised by friends. Since then, I’ve been meaning to put those photos up on the web, as a set—the photos are already up in my gallery, but not presented in the way they were at the exhibition.

I spent some time trying to find a solution I’d be happy with and eventually settled on the following components:

The photos are accompanied by extracts from Jeff Schmidt’s excellent book, Disciplined Minds and audio from the radio show Unwelcome Guests.

I haven’t tested extensively, so if your browser has trouble loading it, please let me know.

View the set

7 July 2008

Media Lens, Bronwen Maddox and threats from the Times

Filed under: General — Keyvan @ 7:41 pm

Media Lens have received legal threats from the Times newspaper concerning their latest media alert, Selling The Fireball: Bush and Iran. Due to these threats they’ve had to amend their alert to remove responses from Times journalist Bronwen Maddox. To read the excellent alert, including the parts the editors have had to remove, you can try one of the following sites: UK Indymedia, UK Watch, CASMII (Campaign Against Sanctions and Military Intervention in Iran).

The Media Lens editors posted the following message about the threats:

We have received repeated threats of legal and police action from Alastair Brett, legal manager of News International’s Times Newspapers on June 28 and July 2. Brett claims a Times Journalist, Bronwen Maddox, has been subject to threatening emails from Media Lens readers. Brett also claims that we have breached copyright by publishing an email from Maddox without permission. We have sought legal advice and, having essentially zero resources for fighting a court case, feel we have no choice but to delete Maddox’s email from our media alert, ‘Selling The Fireball’, as demanded. You can see the amended version [here.]

With more than 1 million people lying dead in Iraq, it pains us greatly to see our attempt to host an honest, rational discussion on the looming threat of war with Iran butchered in this way.

It is almost exactly seven years since we started Media Lens and this is the first time we have been threatened with legal action. We will have more to say about this in due course, as will others. As ever, we strongly urge readers to maintain a polite, non-aggressive and non-abusive tone in communicating with journalists.

Best wishes
The Editors

Update (10 July 2008): Read the followup: News International Threatens Media Lens with Legal and Police Action

20 June 2008

Ad-Free Browsing

Filed under: General — Keyvan @ 12:23 am

Through long-term commercial saturation, it has become implicitly understood by the public that advertising has the right to own, occupy and control every inch of available space. The steady normalization of invasive advertising dulls the public’s perception of their surroundings, re-enforcing a general attitude of powerlessness toward creativity and change, thus a cycle develops enabling advertisers to slowly and consistently increase the saturation of advertising with little or no public outcry.

The Anti-Advertising Agency

If you’re tired of all the advertising you see on the web, follow the steps below:

  1. Download and install Firefox if you don’t use it already.
  2. Install Adblock Plus—it’s the most popular extension for Firefox.
  3. Restart Firefox and when prompted, choose the subscription to EasyList—it’s a free subscription to a list of ad patterns maintained by Rick752.
  4. If you use Google—that’s any Google service, e.g search, maps, mail—go and install CustomizeGoogle.
  5. Restart Firefox and open Tools > CustomizeGoogle Options.
  6. Go through the list of Google services in the left column and for each one, check the ‘Remove ads’ option. Click OK when you’re done.
  7. Enjoy ad-free browsing!

Here’s a screencast of the steps above, which also includes before and after examples.

Finally, if you get bored of all the empty space previously occupied by ads, have a look at the excellent Add-Art project. It uses Adblock Plus, but goes further by actually replacing ads with art. What a great idea! :)

Next Page »