From 073fddc9b0d8a79098a7af2f1b307916a21a48a4 Mon Sep 17 00:00:00 2001 From: retlet Date: Wed, 28 May 2008 01:54:52 +0000 Subject: tagsAndComment formatとstyleを少し追加 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@12587 d0d07461-0603-4401-acd4-de1884942a52 --- sbmcommentsviewer.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'sbmcommentsviewer.js') diff --git a/sbmcommentsviewer.js b/sbmcommentsviewer.js index 16a72b0..045fdef 100644 --- a/sbmcommentsviewer.js +++ b/sbmcommentsviewer.js @@ -22,7 +22,7 @@ * TODO:まだ出来てない * * 指定可能フォーマット: - * id, timpstamp, tags, comment + * id, timpstamp, tags, comment, tagsAndComment * * SBMタイプ: * h : hatena bookmark @@ -72,7 +72,7 @@ SBMContainer.prototype = { //{{{ return label; } else { var str = [ - '' + '
' + label + '
' ]; format.forEach(function(colum){ var name = manager.format[colum] || '-'; @@ -119,15 +119,18 @@ SBMEntry.prototype = { //{{{ format.forEach(function(colum){ switch(colum){ case 'id': - str.push(''); + str.push(''); break; case 'timestamp': - str.push(''); break; + str.push(''); break; case 'tags': - str.push(''); break; + str.push(''); break; case 'comment': - str.push(''); break; + str.push(''); break; + case 'tagsAndComment': + tagString = self.tags.length ? '[' + self.tags.join('][') + ']':''; + str.push(''); break; default: str.push(''); } @@ -354,7 +357,8 @@ var manager = { id: 'ID', comment: 'Comment', timestamp: 'TimeStamp', - tags: 'Tags' + tags: 'Tags', + tagsAndComment: 'Tags&Comment' }, // for debug convertMD5: function(str){ -- cgit v1.2.3
' + label + '
' + (self.userIcon ? '' : '') + - self.id + '' + (self.userIcon ? '

' : '') + + '

' + self.id + '

' + self.formatDate() + '' + self.formatDate() + '' + self.tags.join(',') + '' + self.tags.join(',') + '' + self.comment + '' + self.comment + '' + tagString + ' ' + self.comment + '-