<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Keyvan Minoukadeh &#187; imdb</title>
	<atom:link href="http://www.keyvan.net/tag/imdb/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.keyvan.net</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jan 2012 19:26:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Greasemonkey + jQuery</title>
		<link>http://www.keyvan.net/2008/10/greasemonkey-jquery/</link>
		<comments>http://www.keyvan.net/2008/10/greasemonkey-jquery/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 16:51:59 +0000</pubDate>
		<dc:creator>Keyvan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[imdb]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rating]]></category>
		<category><![CDATA[the pirate bay]]></category>
		<category><![CDATA[torrent]]></category>

		<guid isPermaLink="false">http://www.keyvan.net/?p=91</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>It used to be difficult to combine <a href="http://en.wikipedia.org/wiki/Greasemonkey">Greasemonkey</a> and <a href="http://en.wikipedia.org/wiki/JQuery">jQuery</a> (or any other javascript library). Looking into it again, I came across <a href="http://internetducttape.com/2008/05/08/greasemonkey-ninja-jquery/">3 methods</a> and <a href="http://internetducttape.com/2008/05/08/greasemonkey-ninja-jquery/#comment-156396">this comment</a> from Stephan Sokolow:</p>
<blockquote><p>For the record, the newest Greasemonkey versions should now provide a much better alternative to this.</p>
<p>See <a href="http://wiki.greasespot.net/Metadata_block#.40require">http://wiki.greasespot.net/Metadata_block#.40require</a> for an example of how to efficiently load jQuery from the Google AJAX API &#8230; at userscript install time via the @require metadata key.</p></blockquote>
<p>It really is very simple now&#8212;an example from the page linked aboved:</p>
<pre class="brush:js;">
// ==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!");
	});
});
</pre>
<p>And here&#8217;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:</p>
<p><img src="/wp-content/images/2008-imdb-tpb.gif" alt="before and after comparison of The Pirate Bay" /></p>
<p><a href="http://userscripts.org/scripts/source/35126.user.js">Install the Greasemonkey script</a> and visit The Pirate Bay&#8217;s <a href="http://thepiratebay.org/top/201">Top 100 Movies</a> page to see it in action. You can also <a href="http://userscripts.org/scripts/review/35126">view the source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.keyvan.net/2008/10/greasemonkey-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>


<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              d5be0
Template:           tag
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: www.keyvan.net @ 2012-02-04 04:03:21 -->
