{"id":2047,"date":"2010-07-29T23:48:41","date_gmt":"2010-07-30T04:48:41","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/?p=2047"},"modified":"2010-07-29T23:48:41","modified_gmt":"2010-07-30T04:48:41","slug":"bookmarklet-to-generate-flickr-image-attribution-text-and-link","status":"publish","type":"post","link":"http:\/\/blogs.terrorware.com\/geoff\/2010\/07\/29\/bookmarklet-to-generate-flickr-image-attribution-text-and-link\/","title":{"rendered":"Bookmarklet to generate Flickr image attribution text and link"},"content":{"rendered":"<p>This is a jQuery bookmarklet to extract an attribution string and link from a Flickr photo page.<\/p>\n<p>To use the bookmarklet bookmark this link or drag it to your browser&#8217;s bookmarks bar:<a href=\"javascript:(function(){var%20head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text\/javascript';script.src='http:\/\/geoff.terrorware.com\/hacks\/flickr-attribute\/flickr-attribute.js?'%20+%20Math.floor(Math.random()*99999);head.appendChild(script);})();%20void%200\"> Flickr Attribution<\/a><\/p>\n<p>The code is <a href=\"http:\/\/github.com\/ghing\/Flickr-Attribute\">available at github<\/a>.<\/p>\n<p>At the time that I wrote this bookmarklet, I was using the the Monochrome Author theme (similar to the <a href=\"http:\/\/graphpaperpress.com\/themes\/monochrome-pro\/\">Monochrome Pro<\/a> theme) by Graph Paper Press.  It requires that you have an image associated with each post, so I frequently grab Creative Commons licensed photos for posts where I didn&#8217;t take a photo.  I got tired of building the photo attribution string and link back to the photo by hand, so I made the bookmarklet to generate it with one click.<\/p>\n<p>This is my first attempt at writing a bookmarklet and using jQuery.<\/p>\n<p>I make use of the very helpful <a href=\"http:\/\/www.latentmotion.com\/how-to-create-a-jquery-bookmarklet\/\">jQuery Bookmarklet<\/a> by Brett Barros with modifications by Paul Irish as well as the <a href=\"http:\/\/code.google.com\/p\/zeroclipboard\/\">zeroclipboard<\/a> library for copying the text to the system clipboard.<\/p>\n<p>There are probably some bugs with this code as well as lots of room for improvement.  In particular, it would be nice to have the z-index of the bar displayed by the widget set so it covers all the FLickr page elements, but I couldn&#8217;t set a high z-index without messing up the zeroclipboard functionality.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a jQuery bookmarklet to extract an attribution string and link from a Flickr photo page. To use the bookmarklet bookmark this link or drag it to your browser&#8217;s bookmarks bar: Flickr Attribution The code is available at github. At the time that I wrote this bookmarklet, I was using the the Monochrome Author&hellip; <a class=\"more-link\" href=\"http:\/\/blogs.terrorware.com\/geoff\/2010\/07\/29\/bookmarklet-to-generate-flickr-image-attribution-text-and-link\/\">Continue reading <span class=\"screen-reader-text\">Bookmarklet to generate Flickr image attribution text and link<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[27],"tags":[20513,20511,20512,20509,20510,61],"class_list":["post-2047","post","type-post","status-publish","format-standard","hentry","category-hacks","tag-attribution","tag-bookmarklet","tag-flickr","tag-javascript","tag-jquery","tag-programming","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-x1","_links":{"self":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=2047"}],"version-history":[{"count":1,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2047\/revisions"}],"predecessor-version":[{"id":2049,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/2047\/revisions\/2049"}],"wp:attachment":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=2047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=2047"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=2047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}