{"id":312,"date":"2009-06-03T14:43:20","date_gmt":"2009-06-03T12:43:20","guid":{"rendered":"http:\/\/www.gatellier.be\/blog\/?p=312"},"modified":"2009-06-03T14:43:20","modified_gmt":"2009-06-03T12:43:20","slug":"flickr-short-uri-bookmarklet","status":"publish","type":"post","link":"https:\/\/gatellier.be\/blog\/flickr-short-uri-bookmarklet\/","title":{"rendered":"Flic.kr Short URI Bookmarklet"},"content":{"rendered":"<p>Sur <a href=\"\/\/twitter.com\/maxvoltar\/statuses\/2014913008\">Twitter<\/a>, on voit appara\u00eetre un nouveau type de Short <abbr title=\"Uniform Resource Identifier\">URI<\/abbr> associ\u00e9es \u00e0 <a href=\"\/\/www.flickr.com\/photos\/marin-gatellier\/\">Flickr<\/a>.<\/p>\n<p>Ces adresses web abbr\u00e9vi\u00e9es sont incluses dans le code source de la page d&#8217;une photo (r\u00e9cente) mais <a href=\"\/\/twitter.com\/fred_dela\/statuses\/2015593657\">ne sont pas facile \u00e0 copier\/coller<\/a>.<\/p>\n<p>Voici donc le <strong>bookmarklet<\/strong> permettant de faciliter la <strong>copie des short URI flic.kr<\/strong><\/p>\n<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>\n<p>Je rappelle&nbsp;: un bookmarklet est une micro application JavaScript qui s&#8217;installe en glissant un lien dans ses bookmarks.<\/p>\n<p>Pour les curieux, voici le code&nbsp;:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvoid((function(){\r\n\tvar a=document.getElementsByTagName(&quot;link&quot;);\r\n\tfor (var i=0,j=a.length;i&lt;j;i++){\r\n\t\tif(a&#x5B;i].href.indexOf(('flic.kr'))&gt;-1){\r\n\t\t\tprompt(&quot;copy...&quot;,a&#x5B;i].href);\r\n\t\t}\r\n\t}\r\n})())\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Voici donc le bookmarklet permettant de faciliter la copie des short URI flic.kr<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[139,30,40,54,101],"tags":[187,176,183],"class_list":["post-312","post","type-post","status-publish","format-standard","hentry","category-bookmarklet","category-code","category-flickr","category-javascript","category-twitter","tag-bookmarklet","tag-flickr","tag-javascript"],"_links":{"self":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/posts\/312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":0,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"wp:attachment":[{"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gatellier.be\/blog\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}