<?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>American Butifarra &#187; greasemonkey</title> <atom:link href="http://claude.betancourt.us/tag/greasemonkey/feed/" rel="self" type="application/rss+xml" /><link>http://claude.betancourt.us</link> <description>Claude Betancourt&#039;s Personal Blog</description> <lastBuildDate>Fri, 16 Dec 2011 02:43:25 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>YouTube HD-fier Script</title><link>http://claude.betancourt.us/youtube-hd-fier-greasemonkey-script/</link> <comments>http://claude.betancourt.us/youtube-hd-fier-greasemonkey-script/#comments</comments> <pubDate>Tue, 02 Jun 2009 14:44:33 +0000</pubDate> <dc:creator>Claude</dc:creator> <category><![CDATA[JavaScript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Video]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[greasemonkey]]></category> <category><![CDATA[YouTube]]></category><guid isPermaLink="false">http://claude.betancourt.us/?p=607</guid> <description><![CDATA[This grease monkey script enables HD, when available, for any links on the YouTube Homepage, My Videos &#038; My Favorites. <a href="http://claude.betancourt.us/youtube-hd-fier-greasemonkey-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><span class="drop_cap">I</span> wasn&#8217;t too happy having to click on the HD button of a video in order to view it in high resolution, so I whipped up <a href="http://userscripts.org/scripts/show/50711"><strong>this little grease monkey script</strong></a>. It simply enables HD, when available, for any links on the YouTube Homepage, My Videos &#038; My Favorites.</p><p><span id="more-607"></span></p><p>Feel free to improve it, and leave a comment if you find it useful.</p><p><a href="http://userscripts.org/scripts/show/50711"><strong>Install</strong></a></p><pre class="brush: jscript; title: ; notranslate">
// ==UserScript==
// @name			YouTube HD-fier
// @version			1.0.0
// @namespace		http://claude.betancourt.us/greasemonkey/youtube/hdfier/1.0.0
// @description		Modifies links to enable HD, when available.
// @include			http://www.youtube.com/*
// @license			(CC) Attribution Non-Commercial Share Alike; http://creativecommons.org/licenses/by-nc-sa/3.0/
// ==/UserScript==

// Add jQuery
var GM_jQuery = document.createElement('script');
GM_jQuery.src = 'http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js';
GM_jQuery.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(GM_jQuery);

// Wait until jQuery has loaded
function GM_wait() {
    if( typeof unsafeWindow.jQuery == 'undefined' ) {
        window.setTimeout(GM_wait,100);
    } else {
        $ = unsafeWindow.jQuery;
        GM_ready();
    }
}
GM_wait();

// Once document and jQuery are loaded
function GM_ready() {

	var selectors = [
		'.video-short-title a',
		'.video-mini-title a',
		'.clipper a'
	];

	HDify(selectors);

}

function HDify(selectors) {
	try {
		$.each(selectors,function(i,s){
			var l = $(s);
			$.each(l, function(i,a){
				a.href += '&amp;amp;fmt=18';
			});
		});
	} catch(e){}
}
</pre>]]></content:encoded> <wfw:commentRss>http://claude.betancourt.us/youtube-hd-fier-greasemonkey-script/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: claude.betancourt.us @ 2012-02-07 15:18:21 by W3 Total Cache -->
