Skip to content

Instantly share code, notes, and snippets.

@drikin
Created April 4, 2014 04:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drikin/9968373 to your computer and use it in GitHub Desktop.
Save drikin/9968373 to your computer and use it in GitHub Desktop.
Flickr2Tag Bookmarklet
(function(){
var size='z';
var h=window.location.href;
var f='http://api.flickr.com/services/rest/?method=flickr.urls.lookupuser&api_key=76e0f69b613dbf2ecbd8647ab5de11da&format=json&nojsoncallback=1&url=';
var x=new XMLHttpRequest();
x.open("GET", f+h, false);
x.send(null);
var r=JSON.parse(x.responseText);
var i=r.user.id;
var b='http://flickr2tag.drikin.com/?query='+i+'&size='+size;
var q=h.match(/\/sets\/(\d+)/);
if(q){b=b+'&photoset_id='+q[1]};
window.location.href=b;
})()
@drikin
Copy link
Author

drikin commented Apr 4, 2014

You can convert this script to bookmarklet here
このサイトからbookmarklet化が出来ます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment