Skip to content

Instantly share code, notes, and snippets.

@monjudoh
Created September 26, 2009 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monjudoh/194212 to your computer and use it in GitHub Desktop.
Save monjudoh/194212 to your computer and use it in GitHub Desktop.
// Twitterタイムラインまとめ用script
// まとめる対象を「もっと読む」ボタンなどで全て表示させてから実行すること
// Firebug前提(copy関数)
// JavaScript1.8前提(式クロージャ)
// jQueryロード済み前提(TwitterのWebページならロード済みのはず)
copy(
$('#timeline>li.hentry')
.get()
.reverse()
.map(function(n,i)
({
screenName : $('.screen-name',n).text(),
tweetUrl : $('.meta>a',n).attr('href'),
msgTxt : $('.msgtxt',n).text().replace(/\n/g,''),
})
).map(function(n,i)
'|[{tweetUrl}:title={screenName}]|{msgTxt}|'
.replace(/{([A-z]+)}/g,function($1,$2) n[$2] )
).join('\n')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment