Created
April 4, 2014 04:50
-
-
Save drikin/9968373 to your computer and use it in GitHub Desktop.
Flickr2Tag Bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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; | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can convert this script to bookmarklet here
このサイトからbookmarklet化が出来ます