Created
September 26, 2009 12:47
-
-
Save monjudoh/194212 to your computer and use it in GitHub Desktop.
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
// 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