<?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>Gatellier.be &#187; Twitter</title>
	<atom:link href="http://www.gatellier.be/blog/tags/marin/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gatellier.be/blog</link>
	<description>Interwebs with passion.</description>
	<lastBuildDate>Thu, 24 Nov 2011 13:09:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.gatellier.be/blog/?pushpress=hub'/>
		<item>
		<title>Flic.kr Short URI Bookmarklet</title>
		<link>http://www.gatellier.be/blog/flickr-short-uri-bookmarklet/</link>
		<comments>http://www.gatellier.be/blog/flickr-short-uri-bookmarklet/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 12:43:20 +0000</pubDate>
		<dc:creator>Marin</dc:creator>
				<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.gatellier.be/blog/?p=312</guid>
		<description><![CDATA[Voici donc le bookmarklet permettant de faciliter la copie des short URI flic.kr]]></description>
			<content:encoded><![CDATA[<p>Sur <a href="http://twitter.com/maxvoltar/statuses/2014913008">Twitter</a>, on voit apparaître un nouveau type de Short <abbr title="Uniform Resource Identifier">URI</abbr> associées à <a href="http://www.flickr.com/photos/marin-gatellier/">Flickr</a>.</p>
<p>Ces adresses web abbréviées sont incluses dans le code source de la page d'une photo (récente) mais <a href="http://twitter.com/fred_dela/statuses/2015593657">ne sont pas facile à copier/coller</a>.</p>
<p>Voici donc le <strong>bookmarklet</strong> permettant de faciliter la <strong>copie des short URI flic.kr</strong></p>

<p><strong><a style="padding:5px;border:1px solid #4960A3" href="javascript:void((function(){var%20a=document.getElementsByTagName('link');for(var%20i=0,j=a.length;i%3Cj;i++){if(a[i].href.indexOf(('flic.kr'))%3E-1){prompt('copy...',a[i].href);}}})());">Flic.kr</a></strong></p>

<p>Je rappelle&nbsp;: un bookmarklet est une micro application JavaScript qui s'installe en glissant un lien dans ses bookmarks.</p>

<p>Pour les curieux, voici le code&nbsp;:</p>
<pre class="brush: javascript;">
void((function(){
	var a=document.getElementsByTagName(&quot;link&quot;);
	for (var i=0,j=a.length;i&lt;j;i++){
		if(a[i].href.indexOf(('flic.kr'))&gt;-1){
			prompt(&quot;copy...&quot;,a[i].href);
		}
	}
})())
</pre><hr />
<p><small>© Marin for <a href="http://www.gatellier.be/blog">Gatellier.be</a>, 2009. |
<a href="http://www.gatellier.be/blog/flickr-short-uri-bookmarklet/">Permalink</a> |
<a href="http://www.gatellier.be/blog/flickr-short-uri-bookmarklet/#comments">4 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.gatellier.be/blog/flickr-short-uri-bookmarklet/&title=Flic.kr Short URI Bookmarklet">del.icio.us</a>
<br/>
Post tags: <a href="http://www.gatellier.be/blog/tag/bookmarklet/" rel="tag">bookmarklet</a>, <a href="http://www.gatellier.be/blog/tag/flickr/" rel="tag">flickr</a>, <a href="http://www.gatellier.be/blog/tag/javascript/" rel="tag">javascript</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.gatellier.be/blog/flickr-short-uri-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Geotagging Bookmarklet</title>
		<link>http://www.gatellier.be/blog/geotagging-bookmarklet/</link>
		<comments>http://www.gatellier.be/blog/geotagging-bookmarklet/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 13:53:11 +0000</pubDate>
		<dc:creator>Marin</dc:creator>
				<category><![CDATA[Addons]]></category>
		<category><![CDATA[browsing]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[utilitaire]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[geode]]></category>
		<category><![CDATA[geolocalisation]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[google api]]></category>

		<guid isPermaLink="false">http://www.gatellier.be/blog/?p=249</guid>
		<description><![CDATA[Via les spécifications disponibles et méthodes les plus faciles, je viens donc d'écrire un bookmarklet qui rajoute votre position géographique dans n'importe quel page web.]]></description>
			<content:encoded><![CDATA[<p>ou I CAN HAZ GEOTAGZ?</p>

<h2>Status actuel de la géolocalisation&nbsp;:</h2>

<ul>
	<li>Le <a href="http://www.w3.org/2008/geolocation/" hreflang="en">Groupe de Travail du W3C sur la géolocalisation</a> est en place depuis peu, avec pour but de mettre sur pied des recommandations pour la fin de l'année.</li>
	<li><a href="https://developer.mozilla.org/En/Using_geolocation" hreflang="en">Firefox 3.1 promet</a> l'implémentation d'une <abbr title="Application Programming Interface" lang="en">API</abbr> de géolocalisation (pas encore de tests concluants sur la v3.1b2).</li>
	<li>Une série de providers (tels <a href="http://dev3.maxmind.com/app/javascript_city" hreflang="en" lang="en">MaxMind</a>) fournissent des services de conversion d'adresse <abbr title="Internet Protocol">ip</abbr> vers un pays ou une adresse</li>
	<li>L'<a href="http://loki.com/download" hreflang="en">extension Firefox Loki</a> permet une localisation précise sur base de la triangulation des signaux des routeurs wifi alentours.</li>
	<li>L'<a href="http://labs.mozilla.com/2008/10/introducing-geode/" hreflang="en">extension Firefox Geode</a> promet d'employer les futures spécifications (<code>navigator.geolocation.getCurrentPosition()</code>)</li>
	<li>Google Gears a aussi une <a href="http://code.google.com/apis/gears/api_geolocation.html" hreflang="en">API de géolocalisation</a></li>
	<li><a href="http://code.google.com/apis/ajax/documentation/#ClientLocation" hreflang="en">Google JSAPI</a> (qui permet d'ajouter dans vos sites les librairies JavaScript les plus employées) a des méthodes pour retrouver la position du visiteur.</li>
	<li><a href="http://blog.brightkite.com/2008/05/02/new-features-georss-around-me-radius-nearby-notifications-and-more/" hreflang="en">BrightKite permet de Twitter et géotagguer</a> directement les photos prises avec son iPhone</li>
</ul>

<h2>Geotag bookmarklet</h2>

<p>Via les spécifications disponibles et méthodes les plus faciles, je viens donc d'écrire un bookmarklet qui rajoute votre position géographique dans n'importe quel page web.</p>

<p><strong><a style="padding:5px;border:1px solid #4960A3" href='javascript:var%20GT%3D%28function%28%29%7Bvar%20c%3D4%2Cb%3D%22undefined%22%2Cf%3Ddocument%3Bvar%20e%3Dfunction%28h%2Cg%29%7Bvar%20d%3DMath.pow%2810%2Cg%29%3Breturn%20Math.round%28h*d%29/d%7D%3Bvar%20a%3Dfunction%28g%29%7Bvar%20d%3Df.getElementsByTagName%28%22textarea%22%29%5B0%5D%3Bif%28d.value.indexOf%28%22%23geo%22%29%3C0%29%7Bd.value+%3D%22%23geo%3A%22+e%28g.latitude%2Cc%29+%22%2C%22+e%28g.longitude%2Cc%29%7D%7D%3Bthis.getLocation%3Dfunction%28%29%7Bvar%20d%3Dgoogle.loader.ClientLocation%3Bif%28d%21%3D%3Dnull%29%7Ba%28d%29%7D%7D%3Bthis.tag%3Dfunction%28%29%7Bif%28typeof%28navigator.geolocation%29%21%3Db%29%7Bnavigator.geolocation.getCurrentPosition%28function%28g%29%7Ba%28g%29%7D%29%7Delse%7Bif%28typeof%28google%29%3D%3Db%29%7Bvar%20d%3Ddocument.createElement%28%22script%22%29%3Bd.src%3D%22http%3A//www.google.com/jsapi%3Fcallback%3DGT.getLocation%22%3Bf.getElementsByTagName%28%22body%22%29%5B0%5D.appendChild%28d%29%7D%7D%7D%3Breturn%7Btag%3Atag%2CgetLocation%3AgetLocation%7D%7D%29%28%29%3BGT.tag%28%29%3B'>GeoTag Bookmarket</a></strong></p>

<p>Pour l'installer, il suffit de glisser déposer le lien ci-dessus dans votre barre de favoris.</p>
<p>En cliquant dessus, le bookmarket rajoutera votre position (s'il la trouve) au premier champ <code>textarea</code> de la page que vous visitez. Parfait pour Twitter.com</p>

<h2>Le script de mon Geotag bookmarklet</h2>

<pre class="brush: javascript;">
var GT=(function(){
	var P=4,u=&quot;undefined&quot;,d=document;
	var format=function(n,c){
		var m=Math.pow(10,c);
		return Math.round(n*m)/m;
	};
	var addMarker=function (p){
		var t=d.getElementsByTagName(&quot;textarea&quot;)[0];
		if(t.value.indexOf(&quot;#geo&quot;)&lt;0){t.value+=&quot;#geo:&quot;+format(p.latitude,P)+&quot;,&quot;+format(p.longitude,P);}
	};
	this.getLocation=function(){
		var p=google.loader.ClientLocation;
		if (p!==null){addMarker(p);}
	};
	this.tag=function(){
		if(typeof(navigator.geolocation)!=u){
			//https://developer.mozilla.org/En/Using_geolocation || geode
			navigator.geolocation.getCurrentPosition(function(p){addMarker(p);});
		} else {
			//http://code.google.com/apis/ajax/documentation/#ClientLocation
			if (typeof(google)==u){
				var jsapi=document.createElement(&quot;script&quot;);
				jsapi.src=&quot;http://www.google.com/jsapi?callback=GT.getLocation&quot;;
				d.getElementsByTagName(&quot;body&quot;)[0].appendChild(jsapi);
			}
		}
	};
	return {tag:tag,getLocation:getLocation};
})();
GT.tag();
</pre>

<p>Mon script vérifie si l'objet <code>navigator.geolocation</code> existe (donc, si c'est FF3.1b2 ou si Firefox a l'addon Geode installé), sinon, il utilisera les méthodes fournies par le <a href="http://code.google.com/apis/ajax/documentation/#ClientLocation" hreflang="en">JSAPI de Google</a>.</p>

<h3>Bugs connus&nbsp;:</h3>

<ul>
	<li>Si vous passez par un server proxi pour vous connecter à internet ou si simplement les services de géolocalisation ne reconnaissent pas, aucun tag ne sera affiché.</li>
	<li>Internet Explorer 6 ne supporte pas les longs bookmarklets, je vous recommande donc d'installer un autre navigateur.</li>
	<li>La géolocalisation avec Firefox 3.1 beta 2 ne marche pas encore super bien.</li>
	<li>Je limite la précision à quatre décimales.</li>
	<li>J'emploie le système de géotagging employé BrightKite (par soucis de brièveté pour le status Twitter <code>#geo:&lt;lat&gt;,&lt;long&gt;</code>) et pas <a href="http://en.wikipedia.org/wiki/Geotagging#Geotagging_in_tag-based_systems" hreflang="en">celui recommandé par Flickr</a> (<code>geo:lat=&lt;lat&gt;,geo:lon=&lt;long&gt;</code>)</li>
</ul>

<h3>Liens relatifs&nbsp;:</h3>

<ul>
	<li>Le <a href="http://almaer.com/whereareyou/" hreflang="en">script de Dion Almaer</a> qui emploie aussi Google Gears (via <a href="http://ajaxian.com/archives/firefox-31-beta-geolocation-font-face-video-and-audio-xhr-and-tracemonkey" hreflang="en">Ajaxians</a>)</li>
	<li><a href="http://www.wired.com/software/webservices/news/2008/12/YE8_web?currentPage=2" lang="en">6 technologies de 2008 que vous devez utiliser maintenant</a> (dont la géolocalisation) sur Wired</li>
	<li>Exemple de <a href="http://twitter.com/ryanstewart/status/1055867917" hreflang="en">Tweet géotaggué</a> via BrightKite</li>
</ul><hr />
<p><small>© Marin for <a href="http://www.gatellier.be/blog">Gatellier.be</a>, 2009. |
<a href="http://www.gatellier.be/blog/geotagging-bookmarklet/">Permalink</a> |
<a href="http://www.gatellier.be/blog/geotagging-bookmarklet/#comments">3 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.gatellier.be/blog/geotagging-bookmarklet/&title=Geotagging Bookmarklet">del.icio.us</a>
<br/>
Post tags: <a href="http://www.gatellier.be/blog/tag/firefox/" rel="tag">Firefox</a>, <a href="http://www.gatellier.be/blog/tag/gears/" rel="tag">gears</a>, <a href="http://www.gatellier.be/blog/tag/geode/" rel="tag">geode</a>, <a href="http://www.gatellier.be/blog/tag/geolocalisation/" rel="tag">geolocalisation</a>, <a href="http://www.gatellier.be/blog/tag/geolocation/" rel="tag">geolocation</a>, <a href="http://www.gatellier.be/blog/tag/geotagging/" rel="tag">geotagging</a>, <a href="http://www.gatellier.be/blog/tag/google-api/" rel="tag">google api</a>, <a href="http://www.gatellier.be/blog/tag/twitter/" rel="tag">Twitter</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.gatellier.be/blog/geotagging-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>2008 en une image.</title>
		<link>http://www.gatellier.be/blog/2008-en-une-image/</link>
		<comments>http://www.gatellier.be/blog/2008-en-une-image/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 12:11:46 +0000</pubDate>
		<dc:creator>Marin</dc:creator>
				<category><![CDATA[Twitter]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[tagcloud]]></category>

		<guid isPermaLink="false">http://www.gatellier.be/blog/?p=230</guid>
		<description><![CDATA[mes conversations twitter de l'année 2008 en une image]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/Warin"><img src="http://static.gatellier.be/i/081222/twitter_2008-small.png" alt="mes tweets majeurs de 2008" longdesc="http://tweetstats.com/graphs/warin#tcloud" /></a></p>
<p>Une version plus grande est disponible sur <a href="http://www.flickr.com/photos/marin-gatellier/3128128136/sizes/o/">mon compte Flickr</a>. Réalisé avec <a href="http://www.wordle.net/compose" hreflang="en">Wordle</a>.</p>
<hr />
<p><small>© Marin for <a href="http://www.gatellier.be/blog">Gatellier.be</a>, 2008. |
<a href="http://www.gatellier.be/blog/2008-en-une-image/">Permalink</a> |
<a href="http://www.gatellier.be/blog/2008-en-une-image/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.gatellier.be/blog/2008-en-une-image/&title=2008 en une image.">del.icio.us</a>
<br/>
Post tags: <a href="http://www.gatellier.be/blog/tag/2008/" rel="tag">2008</a>, <a href="http://www.gatellier.be/blog/tag/tagcloud/" rel="tag">tagcloud</a>, <a href="http://www.gatellier.be/blog/tag/twitter/" rel="tag">Twitter</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.gatellier.be/blog/2008-en-une-image/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

