thomblr

convrt yr tumblr <3 to bookmrks
git clone https://wehaveforgeathome.hates.computer/thomblr.git
Log | Files | Refs | LICENSE

commit 92366d94a25c1c0db366840437589bdcdd717989
parent 93a4678b22e83ccbe20b1f907b1b3e450bac6ade
Author: Ryan Wolf <rwolf@borderstylo.com>
Date:   Wed, 23 Mar 2011 16:14:28 +0000

video

Diffstat:
Mstatic/index.html | 6++----
Mtumblr.js | 7+++++++
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/static/index.html b/static/index.html @@ -24,10 +24,8 @@ <ol> <li><input id="email" size="30" type="text" placeholder="enter your tumblr email address" /></li> <li><input id="password" size="30" type="password" placeholder="enter your tumblr password" /></li> - <li><a id="likes" href="likes?email=foo&password=bar" target="_blank">open this link in a new tab</a></li> - <li>save that tab as "bookmarks.html"</li> - <li><a href="http://www.google.com/support/chrome/bin/answer.py?hl=en&answer=96816" target="_blank">open this link in a new tab</a></li> - <li>follow the instructions on that tab to import "bookmarks.html"</li> + <li>save <a id="likes" href="likes?email=foo&password=bar" target="_blank">this tab</a> as "bookmarks.html"</li> + <li>follow the instructions on <a href="http://www.google.com/support/chrome/bin/answer.py?hl=en&answer=96816" target="_blank">this tab</a> to import "bookmarks.html"</li> </ol> </body> </html> diff --git a/tumblr.js b/tumblr.js @@ -18,6 +18,11 @@ var photo = function (post) { return link; }; +var video = function (post) { + var link = post['video-source']; + return (link.indexOf('http') == 0) ? link : regular(post); +}; + exports.serialize = function (post) { switch (post['@'].type) { case 'quote': @@ -28,6 +33,8 @@ exports.serialize = function (post) { return link(post); case 'photo': return photo(post); + case 'video': + return video(post); } return sys.inspect(post); };