<?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>Latent Motion &#187; bookmarklet</title>
	<atom:link href="http://www.latentmotion.com/tag/bookmarklet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.latentmotion.com</link>
	<description>Usability, Design and Front-Side Programming</description>
	<lastBuildDate>Tue, 27 Jul 2010 05:40:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to Create a jQuery Bookmarklet</title>
		<link>http://www.latentmotion.com/how-to-create-a-jquery-bookmarklet/</link>
		<comments>http://www.latentmotion.com/how-to-create-a-jquery-bookmarklet/#comments</comments>
		<pubDate>Thu, 20 May 2010 16:00:15 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[favelet]]></category>
		<category><![CDATA[javascript bookmarklet]]></category>
		<category><![CDATA[jquery bookmarklet]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=475</guid>
		<description><![CDATA[I suspect many of my readers have written at least one jQuery Plugin / Script. In this post, I&#8217;d like to show you how to get the most out of that script by also releasing it as a jQuery Bookmarklet. Below, you&#8217;ll find two examples of utilities that are ripe for bookmarkleting, as well as [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding-top: 5px;"><a class="trans80" style="margin: 0px 10px 20px 20px;" href="http://www.latentmotion.com/downloads/blank-bookmarklet-v1.js"><img style="border: none;" src="http://www.latentmotion.com/wp-content/themes/barecity_1.5/images/download-script.png" alt="" /></a></div>
<p>I suspect many of my readers have written at least one jQuery Plugin / Script. In this post, I&#8217;d like to show you how to get the most out of that script by also releasing it as a jQuery Bookmarklet. Below, you&#8217;ll find two examples of utilities that are ripe for bookmarkleting, as well as a prepared jQuery Bookmarklet file that you can easily modify for the purpose.</p>
<p><em>Note: Even if you haven&#8217;t written a jQuery plugin before, you&#8217;ll find bookmarkleting someone else&#8217;s plugin as easy as using it on a site.</em></p>
<p>Before I get to the code though &#8211; take a look at the payload. You can add the following links as bookmarklets by right-clicking and selecting &#8220;Add to bookmarks / favorites&#8221; (in Chrome, you press &#8220;ctrl+shift+b&#8221; to open the bookmark manager, and drag them over). You can try them before you bookmark them by simply clicking the links on this page too.</p>
<p><strong>Example One:<br />
<script type="text/javascript">// <![CDATA[
var linkster = "javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.latentmotion.com/downloads/tablesorter-bookmarklet-v1.js?' + Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0";
linkster = '<a href="' + linkster + '">Table Column Sorter Bookmarklet</a>';
document.write(linkster);
// ]]&gt;</script></strong><br />
<a></a><br />
Clicking the above link will  add the <a href="http://tablesorter.com/docs/">table sorter jquery plugin</a> to the page, including its stylesheet, and it will apply the script to all tables on the page. Once it&#8217;s loaded, you can click on any of the table column headers to sort the rows by column values.</p>
<p><strong>Example Two:<br />
<script type="text/javascript">// <![CDATA[
var linkster = "javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.latentmotion.com/downloads/visualizer-bookmarklet-v1.js?' + Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0";
linkster = '<a href="' + linkster + '">Table Visualizer Bookmarklet</a>';
document.write(linkster);
// ]]&gt;</script></strong><br />
<a></a></p>
<p>The visualizer bookmarklet will add graphical representations of the data in the table. As with the table sorter, this bookmarklet was adapted from a pre-existing plugin, Filament&#8217;s <a href="http://www.filamentgroup.com/lab/update_to_jquery_visualize_accessible_charts_with_html5_from_designing_with/">jQuery Visualize</a>.</p>
<table style="margin: 10px;">
<caption>2009 Employee Sales by Department</caption>
<thead>
<tr>
<td></td>
<th scope="col">food</th>
<th scope="col">auto</th>
<th scope="col">household</th>
<th scope="col">furniture</th>
<th scope="col">kitchen</th>
<th scope="col">bath</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Mary</th>
<td>190</td>
<td>160</td>
<td>40</td>
<td>120</td>
<td>30</td>
<td>70</td>
</tr>
<tr>
<th scope="row">Tom</th>
<td>3</td>
<td>40</td>
<td>30</td>
<td>45</td>
<td>35</td>
<td>49</td>
</tr>
<tr>
<th scope="row">Brad</th>
<td>10</td>
<td>180</td>
<td>10</td>
<td>85</td>
<td>25</td>
<td>79</td>
</tr>
<tr>
<th scope="row">Kate</th>
<td>40</td>
<td>80</td>
<td>90</td>
<td>25</td>
<td>15</td>
<td>119</td>
</tr>
</tbody>
</table>
<p><span id="more-475"></span></p>
<p>Cool stuff, right? Let&#8217;s get to how it works then &#8211; starting with the prepared jQuery Bookmarklet template. This is what I recommend you use when writing your own bookmarklets:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*
 * jQuery Bookmarklet - version 1.0
 * Originally written by: Brett Barros
 * With modifications by: Paul Irish
 *
 * If you use this script, please link back to the source
 *
 * Copyright (c) 2010 Latent Motion (http://latentmotion.com/how-to-create-a-jquery-bookmarklet/)
 * Released under the Creative Commons Attribution 3.0 Unported License,
 * as defined here: http://creativecommons.org/licenses/by/3.0/
 *
 */</span>
&nbsp;
window.<span style="color: #660066;">bookmarklet</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// These are the styles, scripts and callbacks we include in our bookmarklet:</span>
window.<span style="color: #660066;">bookmarklet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    css <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://www.site.com/your.css'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    js  <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://www.site.com/your.js'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>    
<span style="color: #006600; font-style: italic;">//	jqpath : 'myCustomjQueryPath.js', &lt;-- option to include your own path to jquery</span>
    ready <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// The meat of your jQuery code goes here</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello World&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   	    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fullFunc<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">function</span> d<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">length</span><span style="color: #339933;">===</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>a.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span>$.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>d<span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #003366; font-weight: bold;">function</span> e<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>b<span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>c<span style="color: #339933;">,</span>f<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;link&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>href<span style="color: #339933;">:</span>f<span style="color: #339933;">,</span>rel<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;stylesheet&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">=</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">||</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;script&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">type</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">src</span><span style="color: #339933;">=</span>b<span style="color: #339933;">;</span>c.<span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>e<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">css</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>d<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">js</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>From top to bottom, what the <a href="http://www.latentmotion.com/downloads/blank-bookmarklet-v1.js">jQuery Bookmarklet Template</a> does is:</p>
<ol>
<li>Prepare the full bookmarklet function. This is the call to the minified code in the last line of the js file. It is in an uncompressed format at the bottom of this post for those interested, but most will never need to see it..</li>
<li>Create the configurations, including arrays to your CSS and JS files. You can load as many as you see fit, and the JS files will load asynchronously, ensuring that each file can reliably depend on the file before it.</li>
<li>Provides the callback function for your editing. Place whatever jQuery code you like here.</li>
</ol>
<p>In order to use that script, though, you&#8217;ll need to create a link that calls it. Here&#8217;s the code for that link:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.site.com/your-javascript.js?' + Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0&quot;&gt;Your Bookmarklet Name&lt;/a&gt;</pre></div></div>

<p>To some that might look like a handful, but don&#8217;t worry, the hard work is already done. All you need to do is change the url in that link to point to your javascript file, and add a little regular-ol-jQuery to that javascript file.</p>
<p>Ok, still with me? Great! Now let&#8217;s look at one of the actual live examples we used earlier on the page. Here&#8217;s how I included table sorter, which requires both a JS and CSS  file:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*
 * jQuery Bookmarklet - version 1.0
 * Originally written by: Brett Barros
 * With modifications by: Paul Irish
 *
 * If you use this script, please link back to the source
 *
 * Copyright (c) 2010 Latent Motion (http://latentmotion.com/how-to-create-a-jquery-bookmarklet/)
 * Released under the Creative Commons Attribution 3.0 Unported License,
 * as defined here: http://creativecommons.org/licenses/by/3.0/
 *
 */</span>
&nbsp;
window.<span style="color: #660066;">bookmarklet</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// These are the styles, scripts and callbacks we include in our bookmarklet:</span>
window.<span style="color: #660066;">bookmarklet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    css <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/themes/blue/style.css'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    js  <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/jquery.tablesorter.js'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>    
<span style="color: #006600; font-style: italic;">//	jqpath : 'myCustomjQueryPath.js', &lt;-- option to include your own path to jquery</span>
    ready <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Initiate table sorter</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;table&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tablesorter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;tablesorter&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 	
&nbsp;
   	    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fullFunc<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">function</span> d<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">length</span><span style="color: #339933;">===</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>a.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span>$.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>d<span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #003366; font-weight: bold;">function</span> e<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>b<span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>c<span style="color: #339933;">,</span>f<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;link&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>href<span style="color: #339933;">:</span>f<span style="color: #339933;">,</span>rel<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;stylesheet&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">=</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">||</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;script&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">type</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">src</span><span style="color: #339933;">=</span>b<span style="color: #339933;">;</span>c.<span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>e<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">css</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>d<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">js</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>For your convenience, you can also <a href="http://www.latentmotion.com/jquery-bookmarklet/tablesorter-bookmarklet.js">download the script as a JS file</a>.</p>
<p>And that&#8217;s about it! Sorta, anyway. Here&#8217;re some bonus thoughts for the real enthusiasts:</p>
<ol>
<li>Bookmarklets leverage caching, big time. When developing, I found this to be a major frustration, so I added a large random number at the end of the js call, which effectively forces a reload each time the javascript is called. Upon deployment &#8211; you may choose to remove it, but keep it in mind next time you make a change and don&#8217;t see the effects.</li>
<li>Another reason I force refreshing of my js file is because I want to be able to update my scripts without forcing my users to re-bookmark them.</li>
<li>If you create your own bookmarklet and want to post about it in wordpress, you&#8217;ll quickly learn you need a workaround. The first one I used was hardcoding the links in an external page, and displaying them through an iframe. It worked, but was lame. Now I&#8217;m using javascript to store the desired a href as a variable, then I wrap that variable with the tags, and finally I document.write it. If you have a better idea, let me know.</li>
<li>The table examples that I&#8217;ve provided on this page are based on pre-existing jQuery plugins. Those plugins assume that tables are correctly formatted, with table headers etc. If a website&#8217;s layout was built in the 90s and still uses tables for page structure, the results won&#8217;t be pretty. </li>
<li>Sadly, Disqus (the host service for my comments below) uses tables. This of course conflicts with the specific table examples I used above, and can be resolved by refreshing. I&#8217;m sure it&#8217;s possible to set the bookmarklet to listen for a click of a table, but that&#8217;s beyond the scope of the current script/lesson.</li>
</ol>
<p>And here&#8217;s some extra credit reading:</p>
<ul>
<li><a href="http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet">Learning jQuery</a> made me realize that loading jQuery dynamically is possible. Almost ironically, Paul Irish helped with some modifications over there too.</li>
<li>After writing this article, I was informed <a href="http://benalman.com/projects/run-jquery-code-bookmarklet/">Ben Alman</a> had already written a similar script. His actually includes a &#8220;generator&#8221; that will use your jquery code and embed it for you, which is cool. It doesn&#8217;t include a loop to first include javascript / css files, but he probably figured it was easy enough to add yourself.</li>
<li><a href="http://iamnotagoodartist.com/">Tommy</a>, at <a href="http://www.smashingmagazine.com/2010/05/23/make-your-own-bookmarklets-with-jquery/">Smashing Magazine</a>, wrote a much more in-depth article about the details and options when writing a jQuery bookmarklet. Although it was posted a few days after I posted mine, he had submitted it months in advance. Smart guy <img src='http://www.latentmotion.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li><a href="http://marklets.com">Marklets</a> is a pretty nifty bookmark database that gives you searchable access to triggering any script in the arsenal. The creator and I are discussing a joint bookmarkleting project. Contact me if you&#8217;re interested in making bookmarklets kick ass again.</li>
</ul>
<p>If you have any ideas, questions, or musings, I&#8217;d love to hear &#8216;em! Please add your comment below.</p>
<p><em><strong>Update:</strong> <a href="http://paulirish.com/">Paul Irish</a> was kind enough to help improve this script and teach me a couple things along the way. The following is the unminified version of what I&#8217;ve listed above, and includes his structural changes.</em></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*
 * jQuery Bookmarklet - version 1.0
 * Originally written by: Brett Barros
 * Heavily modified by: Paul Irish
 *
 * If you use this script, please link back to the source
 *
 * Copyright (c) 2010 Latent Motion (http://latentmotion.com/how-to-create-a-jquery-bookmarklet/)
 * Released under the Creative Commons Attribution 3.0 Unported License,
 * as defined here: http://creativecommons.org/licenses/by/3.0/
 *
 */</span>
&nbsp;
window.<span style="color: #660066;">bookmarklet</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// These are the styles, scripts and callbacks we include in our bookmarklet:</span>
window.<span style="color: #660066;">bookmarklet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    css <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/themes/blue/style.css'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    js  <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/jquery.tablesorter.js'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>    
<span style="color: #006600; font-style: italic;">//	jqpath : 'myCustomjQueryPath.js', &lt;-- option to include your own jquery</span>
    ready <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Initiate table sorter</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;table&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tablesorter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;tablesorter&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 	
&nbsp;
   	    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// User doesn't have to set jquery, we have a default.</span>
    opts.<span style="color: #660066;">jqpath</span> <span style="color: #339933;">=</span> opts.<span style="color: #660066;">jqpath</span> <span style="color: #339933;">||</span> <span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> getJS<span style="color: #009900;">&#40;</span>jsfiles<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Check if we've processed all of the JS files (or if there are none)</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>jsfiles.<span style="color: #660066;">length</span> <span style="color: #339933;">===</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		opts.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Load the first js file in the array</span>
        $.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span>jsfiles<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>  <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
&nbsp;
            <span style="color: #006600; font-style: italic;">// When it's done loading, remove it from the queue and call the function again    </span>
            getJS<span style="color: #009900;">&#40;</span>jsfiles.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Synchronous loop for css files</span>
    <span style="color: #003366; font-weight: bold;">function</span> getCSS<span style="color: #009900;">&#40;</span>csfiles<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        $.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>csfiles<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;link&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                    href<span style="color: #339933;">:</span> val<span style="color: #339933;">,</span>
                    rel<span style="color: #339933;">:</span> <span style="color: #3366CC;">'stylesheet'</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">function</span> getjQuery<span style="color: #009900;">&#40;</span>filename<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Create jQuery script element</span>
		<span style="color: #003366; font-weight: bold;">var</span> fileref <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span>
		fileref.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
		fileref.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span>  filename<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Once loaded, trigger other scripts and styles</span>
		fileref.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			getCSS<span style="color: #009900;">&#40;</span>opts.<span style="color: #660066;">css</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// load CSS files</span>
			getJS<span style="color: #009900;">&#40;</span>opts.<span style="color: #660066;">js</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// load JS files</span>
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
		document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>fileref<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	getjQuery<span style="color: #009900;">&#40;</span>opts.<span style="color: #660066;">jqpath</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// kick it off</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// end of bookmarklet();</span></pre></div></div>





	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F%26amp%3Btitle%3DHow%2520to%2520Create%2520a%2520jQuery%2520Bookmarklet%26amp%3Bbodytext%3D%250D%250AI%2520suspect%2520many%2520of%2520my%2520readers%2520have%2520written%2520at%2520least%2520one%2520jQuery%2520Plugin%2520%252F%2520Script.%2520In%2520this%2520post%252C%2520I%2527d%2520like%2520to%2520show%2520you%2520how%2520to%2520get%2520the%2520most%2520out%2520of%2520that%2520script%2520by%2520also%2520releasing%2520it%2520as%2520a%2520jQuery%2520Bookmarklet.%2520Below%252C%2520you%2527ll%2520find%2520two%2520examples%2520of%2520utilities%2520that';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F%26amp%3Btitle%3DHow%2520to%2520Create%2520a%2520jQuery%2520Bookmarklet%26amp%3Bnotes%3D%250D%250AI%2520suspect%2520many%2520of%2520my%2520readers%2520have%2520written%2520at%2520least%2520one%2520jQuery%2520Plugin%2520%252F%2520Script.%2520In%2520this%2520post%252C%2520I%2527d%2520like%2520to%2520show%2520you%2520how%2520to%2520get%2520the%2520most%2520out%2520of%2520that%2520script%2520by%2520also%2520releasing%2520it%2520as%2520a%2520jQuery%2520Bookmarklet.%2520Below%252C%2520you%2527ll%2520find%2520two%2520examples%2520of%2520utilities%2520that';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DHow%2520to%2520Create%2520a%2520jQuery%2520Bookmarklet%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/how-to-create-a-jquery-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>How to use Firebug in IE6 (and all other browsers)</title>
		<link>http://www.latentmotion.com/how-to-use-firebug-in-ie6-and-all-other-browsers/</link>
		<comments>http://www.latentmotion.com/how-to-use-firebug-in-ie6-and-all-other-browsers/#comments</comments>
		<pubDate>Fri, 07 May 2010 09:37:42 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[firebug]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=471</guid>
		<description><![CDATA[Yaknow, I&#8217;ve been using Firebug for quite some time, but I haven&#8217;t seen many places mention using it as a bookmarklet. Having gotten partway through programming my own makeshift javascript bookmarklet debugger, I was thrilled to find out Firebug Lite can be bookmarkletized too! Here&#8217;s the link &#8211; right click and add it to your [...]]]></description>
			<content:encoded><![CDATA[<p>Yaknow, I&#8217;ve been using Firebug for quite some time, but I haven&#8217;t seen many places mention using it as a bookmarklet. Having gotten partway through programming my own makeshift javascript bookmarklet debugger, I was thrilled to find out Firebug Lite can be bookmarkletized too! Here&#8217;s the link &#8211; right click and add it to your bookmarks to try it out:</p>
<p><script type="text/javascript">
var linkster = "javascript:var%20firebug=document.createElement('script');firebug.setAttribute('src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js');document.body.appendChild(firebug);(function(){if(window.firebug.version){firebug.init();}else{setTimeout(arguments.callee);}})();void(firebug);";
linkster = '<a href="' + linkster + '">Firebug Bookmarklet</a>';
document.write(linkster);
</script></p>




	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-use-firebug-in-ie6-and-all-other-browsers%252F%26amp%3Btitle%3DHow%2520to%2520use%2520Firebug%2520in%2520IE6%2520%2528and%2520all%2520other%2520browsers%2529%26amp%3Bbodytext%3DYaknow%252C%2520I%2527ve%2520been%2520using%2520Firebug%2520for%2520quite%2520some%2520time%252C%2520but%2520I%2520haven%2527t%2520seen%2520many%2520places%2520mention%2520using%2520it%2520as%2520a%2520bookmarklet.%2520Having%2520gotten%2520partway%2520through%2520programming%2520my%2520own%2520makeshift%2520javascript%2520bookmarklet%2520debugger%252C%2520I%2520was%2520thrilled%2520to%2520find%2520out%2520Firebug%2520Lite';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-use-firebug-in-ie6-and-all-other-browsers%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-use-firebug-in-ie6-and-all-other-browsers%252F%26amp%3Btitle%3DHow%2520to%2520use%2520Firebug%2520in%2520IE6%2520%2528and%2520all%2520other%2520browsers%2529%26amp%3Bnotes%3DYaknow%252C%2520I%2527ve%2520been%2520using%2520Firebug%2520for%2520quite%2520some%2520time%252C%2520but%2520I%2520haven%2527t%2520seen%2520many%2520places%2520mention%2520using%2520it%2520as%2520a%2520bookmarklet.%2520Having%2520gotten%2520partway%2520through%2520programming%2520my%2520own%2520makeshift%2520javascript%2520bookmarklet%2520debugger%252C%2520I%2520was%2520thrilled%2520to%2520find%2520out%2520Firebug%2520Lite';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DHow%2520to%2520use%2520Firebug%2520in%2520IE6%2520%2528and%2520all%2520other%2520browsers%2529%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Fhow-to-use-firebug-in-ie6-and-all-other-browsers%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/how-to-use-firebug-in-ie6-and-all-other-browsers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free RapidShare Service &amp; Countdown Bypass JavaScript</title>
		<link>http://www.latentmotion.com/free-rapidshare-service-countdown-bypass-javascript/</link>
		<comments>http://www.latentmotion.com/free-rapidshare-service-countdown-bypass-javascript/#comments</comments>
		<pubDate>Wed, 05 May 2010 01:55:57 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[bypass]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[skip]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=438</guid>
		<description><![CDATA[The free RapidShare downloads are pretty good &#8211; but the downloading process  is unnecessarily frustrating. Whereas many other providers drown their visitors with ads to generate revenue that pay for their servers (which is reasonable), RapidShare forces you to wait for no reason other than to frustrate you. Fortunately, as adblocker has proven, we are capable and [...]]]></description>
			<content:encoded><![CDATA[<p>The free RapidShare downloads are pretty good &#8211; but the downloading process  is unnecessarily frustrating. Whereas many other providers drown their visitors with ads to generate revenue that pay for their servers (which is reasonable), RapidShare forces you to wait for no reason other than to frustrate you.</p>
<p>Fortunately, as adblocker has proven, we are capable and legally entitled to control the display of websites as we please. So, with no further ado, here is the solution:</p>
<p><script type="text/javascript">
// WordPress messes up html bookmarklets
var linkster = "javascript:(function(){var head=document.getElementsByTagName('head')[0], script=document.createElement('script') ;script.type='text/javascript'; script.src='http://www.latentmotion.com/downloads/skip-timers.js?' + Math.floor(Math.random()*99999); head.appendChild(script);})(); void 0";
linkster = '<a href="' + linkster + '">Skip Timers Bookmarklet</a>';
document.write(linkster);
</script></p>
<p>Simply right click and bookmark the above link, so that next time you&#8217;re stuck on a web page that&#8217;s making you wait for <strong>no good reason</strong>, you can open the bookmark, and the countdown will immediately complete.</p>
<p>Here is a <a href="http://rs374.rapidshare.com/files/383226133/Penguins.jpg" rel="shadowbox[post-438];player=img;">Rapidshare File</a> to test it on.</p>
<p><span id="more-438"></span></p>
<p>For those interested, here is how the script works:</p>
<ol>
<li>The aforementioned link executes javascript on the page it&#8217;s loaded on. This javascript loads an external file.</li>
<li>In the external file, we pull all of the variables a page is using.</li>
<li>One second later, we pull all of the variables again.</li>
<li>We compare the first set of variables to the second set, and if any are exactly just one less, we identify a countdown timer</li>
<li>We now know which variable to set &#8211; and we set it to 1 (or very low).</li>
</ol>
<p>The bookmark link looks like this:</p>
<pre>
<pre class="brush: xml;">
&lt;a href=&quot;javascript:(function(){var head=document.getElementsByTagName('head')[0], script=document.createElement('script') ;script.type='text/javascript'; script.src='http://www.latentmotion.com/downloads/skip-timers.js?' + Math.floor(Math.random()*99999); head.appendChild(script);})(); void 0&quot;&gt;Skip Timers Bookmarklet&lt;/a&gt;
</pre>
</pre>
<p>And the external javascript looks like this:</p>
<pre>
<pre class="brush: jscript;">
/*
 * Skip Timers - version 0.1
 * Written By: Brett Barros
 *
 * The purpose of this script is to save you time by setting countdown
 * timers immediately to 1.
 *
 * If you use this script, please link back to my site with credit / kudos
 *
 * Copyright (c) 2010 Latent Motion (http://latentmotion.com/downloads/skip-timers.html)
 * Released under the Creative Commons Attribution 3.0 Unported License,
 * as defined here: http://creativecommons.org/licenses/by/3.0/
 *
 */

// List of original variables
var oldVars = {};
for (var name in this) {
	oldVars[name] = this[name];
}

// Compare variables one second later
function compareVars() {
	var newVars = {};
	for (var name in this) {
		newVars[name] = this[name];
	}
   for (var key in oldVars) {
     if (oldVars[key] !== (newVars[key])) {
	  	 window[key] = 1;
     }
   }
}

// Call function to compare variables
setTimeout(&quot;compareVars()&quot;,1000);
</pre>
</pre>




	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Ffree-rapidshare-service-countdown-bypass-javascript%252F%26amp%3Btitle%3DFree%2520RapidShare%2520Service%2520%2526%2520Countdown%2520Bypass%2520JavaScript%26amp%3Bbodytext%3DThe%2520free%2520RapidShare%2520downloads%2520are%2520pretty%2520good%2520-%2520but%2520the%2520downloading%2520process%2520%25C2%25A0is%2520unnecessarily%2520frustrating.%2520Whereas%2520many%2520other%2520providers%25C2%25A0drown%25C2%25A0their%2520visitors%2520with%2520ads%2520to%2520generate%2520revenue%2520that%2520pay%2520for%2520their%2520servers%2520%2528which%2520is%2520reasonable%2529%252C%2520RapidShare%2520';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Ffree-rapidshare-service-countdown-bypass-javascript%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Ffree-rapidshare-service-countdown-bypass-javascript%252F%26amp%3Btitle%3DFree%2520RapidShare%2520Service%2520%2526%2520Countdown%2520Bypass%2520JavaScript%26amp%3Bnotes%3DThe%2520free%2520RapidShare%2520downloads%2520are%2520pretty%2520good%2520-%2520but%2520the%2520downloading%2520process%2520%25C2%25A0is%2520unnecessarily%2520frustrating.%2520Whereas%2520many%2520other%2520providers%25C2%25A0drown%25C2%25A0their%2520visitors%2520with%2520ads%2520to%2520generate%2520revenue%2520that%2520pay%2520for%2520their%2520servers%2520%2528which%2520is%2520reasonable%2529%252C%2520RapidShare%2520';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DFree%2520RapidShare%2520Service%2520%2526%2520Countdown%2520Bypass%2520JavaScript%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Ffree-rapidshare-service-countdown-bypass-javascript%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/free-rapidshare-service-countdown-bypass-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

