Created
July 19, 2011 23:25
-
-
Save rayboyd/1093999 to your computer and use it in GitHub Desktop.
Bookmarklet to send basic IMDb info via GET request to a url.
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
javascript:(function(){var meta=document.getElementsByTagName('meta');for(var i=0;i<meta.length;i++){switch(meta[i].getAttribute('property')){case'og:title':var title=encodeURIComponent(meta[i].getAttribute('content'));break;case'og:director':var director=encodeURIComponent(meta[i].getAttribute('content'));break;case'og:url':var url=encodeURIComponent(meta[i].getAttribute('content'));break;};};window.open('http://url.co.uk/?title='+title+'&director='+director+'&url='+url);})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment