<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: External Site Link Favorite Icons Using MooTools and&#160;CSS</title> <atom:link href="http://davidwalsh.name/external-favicon/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/external-favicon</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Tue, 22 May 2012 16:21:46 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: karev</title><link>http://davidwalsh.name/external-favicon#comment-18943</link> <dc:creator>karev</dc:creator> <pubDate>Wed, 21 Jul 2010 20:11:55 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-18943</guid> <description>really usefull but how can i disable this feature for linked images ???????</description> <content:encoded><![CDATA[<p>really usefull but how can i disable this feature for linked images ???????</p> ]]></content:encoded> </item> <item><title>By: Blogging Tips</title><link>http://davidwalsh.name/external-favicon#comment-10460</link> <dc:creator>Blogging Tips</dc:creator> <pubDate>Fri, 17 Jul 2009 03:00:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-10460</guid> <description>Here is a simple step by step tutorials to create your own FAVICON easily on
photoshop cs version.   &lt;a href=&quot;http://freetemplates4u.co.cc/wordpress/2009/07/web-20-favicon-photoshop-tutorial/&quot; rel=&quot;nofollow&quot;&gt;
How to create FAVICON using Photoshop?&lt;/a&gt;</description> <content:encoded><![CDATA[<p>Here is a simple step by step tutorials to create your own FAVICON easily on<br
/> photoshop cs version. <a
href="http://freetemplates4u.co.cc/wordpress/2009/07/web-20-favicon-photoshop-tutorial/" rel="nofollow"><br
/> How to create FAVICON using Photoshop?</a></p> ]]></content:encoded> </item> <item><title>By: Facundo</title><link>http://davidwalsh.name/external-favicon#comment-9357</link> <dc:creator>Facundo</dc:creator> <pubDate>Thu, 21 May 2009 23:42:48 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9357</guid> <description>Complete offtopic: Can you move the site search box to a more prominent place? It took me some time to find it....</description> <content:encoded><![CDATA[<p>Complete offtopic: Can you move the site search box to a more prominent place? It took me some time to find it&#8230;.</p> ]]></content:encoded> </item> <item><title>By: Tim</title><link>http://davidwalsh.name/external-favicon#comment-9354</link> <dc:creator>Tim</dc:creator> <pubDate>Thu, 21 May 2009 21:05:52 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9354</guid> <description>Nice idea, this could be usefull for my next linklist ^^</description> <content:encoded><![CDATA[<p>Nice idea, this could be usefull for my next linklist ^^</p> ]]></content:encoded> </item> <item><title>By: dirkf</title><link>http://davidwalsh.name/external-favicon#comment-9353</link> <dc:creator>dirkf</dc:creator> <pubDate>Thu, 21 May 2009 19:03:01 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9353</guid> <description>Cool idea !As not all website are having a favicon, I added some stuff to check if the favicon is properly loaded.
If not, the background-image should not be changed, and remains the default image I use to indicate external links.My inner code block looks like this:var favicon = href.replace(/^(http:\/\/[^\/]+).*$/, &#039;$1&#039;) + &#039;/favicon.ico&#039;,
img = new Image();img.onload = function(){
a.setStyle(&#039;background-image&#039;,&#039;url(&#039; + favicon + &#039;)&#039;);
}
img.src = favicon; //load it now. </description> <content:encoded><![CDATA[<p>Cool idea !</p><p>As not all website are having a favicon, I added some stuff to check if the favicon is properly loaded.<br
/> If not, the background-image should not be changed, and remains the default image I use to indicate external links.</p><p>My inner code block looks like this:</p><p>var favicon = href.replace(/^(http:\/\/[^\/]+).*$/, &#8216;$1&#8242;) + &#8216;/favicon.ico&#8217;,<br
/> img = new Image();</p><p>img.onload = function(){<br
/> a.setStyle(&#8216;background-image&#8217;,'url(&#8216; + favicon + &#8216;)&#8217;);<br
/> }<br
/> img.src = favicon; //load it now.</p> ]]></content:encoded> </item> <item><title>By: Crispijn</title><link>http://davidwalsh.name/external-favicon#comment-9346</link> <dc:creator>Crispijn</dc:creator> <pubDate>Thu, 21 May 2009 14:12:07 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9346</guid> <description>Nice one David! Simple but very effective!</description> <content:encoded><![CDATA[<p>Nice one David! Simple but very effective!</p> ]]></content:encoded> </item> <item><title>By: Sebastian Markbåge</title><link>http://davidwalsh.name/external-favicon#comment-9345</link> <dc:creator>Sebastian Markbåge</dc:creator> <pubDate>Thu, 21 May 2009 13:54:31 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9345</guid> <description>Actually, since you&#039;re not using the link URI for anything else you don&#039;t have to create another object.Just use uri.set(&#039;value&#039;, &#039;/favicon.ico&#039;); Set value will take relative paths.</description> <content:encoded><![CDATA[<p>Actually, since you&#8217;re not using the link URI for anything else you don&#8217;t have to create another object.</p><p>Just use uri.set(&#8216;value&#8217;, &#8216;/favicon.ico&#8217;); Set value will take relative paths.</p> ]]></content:encoded> </item> <item><title>By: Jan</title><link>http://davidwalsh.name/external-favicon#comment-9344</link> <dc:creator>Jan</dc:creator> <pubDate>Thu, 21 May 2009 13:51:48 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9344</guid> <description>Grat one, even better idea!!! I created something similar adding icon to for all external links  using URI subclass  http://mootools.net/docs/more/Native/URIwindow.addEvent(&#039;domready&#039;,function() {
var host = window.location.host;
var links = $$(&#039;a&#039;);
links.each(function(elem,i){
var myURI = new URI(elem.get(&#039;href&#039;));
var hostExtern = myURI.get(&#039;host&#039;);
if(hostExtern!=host) {
elem.addClass(&#039;web&#039;);
}
})
})</description> <content:encoded><![CDATA[<p>Grat one, even better idea!!! I created something similar adding icon to for all external links  using URI subclass <a
href="http://mootools.net/docs/more/Native/URI" rel="nofollow">http://mootools.net/docs/more/Native/URI</a></p><p> window.addEvent(&#8216;domready&#8217;,function() {<br
/> var host = window.location.host;<br
/> var links = $$(&#8216;a&#8217;);<br
/> links.each(function(elem,i){<br
/> var myURI = new URI(elem.get(&#8216;href&#8217;));<br
/> var hostExtern = myURI.get(&#8216;host&#8217;);<br
/> if(hostExtern!=host) {<br
/> elem.addClass(&#8216;web&#8217;);<br
/> }<br
/> })<br
/> })</p> ]]></content:encoded> </item> <item><title>By: Sebastian Markbåge</title><link>http://davidwalsh.name/external-favicon#comment-9343</link> <dc:creator>Sebastian Markbåge</dc:creator> <pubDate>Thu, 21 May 2009 13:41:10 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9343</guid> <description>You can also use the new MooTools More URI syntax which also works with base-tags.window.addEvent(&#039;domready&#039;,function(){
var baseHost = URI.base.get(&#039;host&#039;);
$$(&#039;a[href^=&quot;http://&quot;]&#039;).each(function(a){
var uri = new URI(a);
if(baseHost != uri.get(&#039;host&#039;)){
var favicon = new URI(&#039;/favicon.ico&#039;, { base: uri });
a.setStyle(&#039;background-image&#039;,&#039;url(&#039; + favicon + &#039;)&#039;).addClass(&#039;favicon&#039;);
}
});
}); </description> <content:encoded><![CDATA[<p>You can also use the new MooTools More URI syntax which also works with base-tags.</p><p>window.addEvent(&#8216;domready&#8217;,function(){<br
/> var baseHost = URI.base.get(&#8216;host&#8217;);<br
/> $$(&#8216;a[href^="http://"]&#8216;).each(function(a){<br
/> var uri = new URI(a);<br
/> if(baseHost != uri.get(&#8216;host&#8217;)){<br
/> var favicon = new URI(&#8216;/favicon.ico&#8217;, { base: uri });<br
/> a.setStyle(&#8216;background-image&#8217;,'url(&#8216; + favicon + &#8216;)&#8217;).addClass(&#8216;favicon&#8217;);<br
/> }<br
/> });<br
/> });</p> ]]></content:encoded> </item> <item><title>By: NICEOUTPUT</title><link>http://davidwalsh.name/external-favicon#comment-9342</link> <dc:creator>NICEOUTPUT</dc:creator> <pubDate>Thu, 21 May 2009 13:21:04 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=2223#comment-9342</guid> <description>This is great, simple and effective, thanks David.</description> <content:encoded><![CDATA[<p>This is great, simple and effective, thanks David.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 3/7 queries in 0.005 seconds using disk: basic
Object Caching 805/805 objects using disk: basic

Served from: davidwalsh.name @ 2012-05-22 17:35:14 -->
