diff options
author | retlet | 2008-05-28 01:54:52 +0000 |
---|---|---|
committer | retlet | 2008-05-28 01:54:52 +0000 |
commit | 073fddc9b0d8a79098a7af2f1b307916a21a48a4 (patch) | |
tree | 4b346c4fd30cb09bfa67f869c0b5e47044e3662e /sbmcommentsviewer.js | |
parent | 27a0f1f1cc9fa684c3ff12141c32fe60cabcfe28 (diff) | |
download | vimperator-plugins-073fddc9b0d8a79098a7af2f1b307916a21a48a4.tar.bz2 |
tagsAndComment formatとstyleを少し追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@12587 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'sbmcommentsviewer.js')
-rw-r--r-- | sbmcommentsviewer.js | 20 |
1 files changed, 12 insertions, 8 deletions
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 = [ - '<table><caption style="text-align:left;" class="hl-Title">' + label + '</caption><tr>' + '<table id="liberator-sbmcommentsviewer"><caption style="text-align:left;" class="hl-Title">' + label + '</caption><tr>' ]; 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('<td>' + (self.userIcon ? '<img src="'+self.userIcon +'" width="16" height="16"/>' : '') + - self.id + '</td>'); + str.push('<td class="liberator-sbmcommentsviewer-id">' + (self.userIcon ? '<p style="display:table-cell;vertical-align:middle;padding-right:3px;"><img src="'+self.userIcon +'" width="16" height="16"/></p>' : '') + + '<p style="display:table-cell;vertical-align:middle;">' + self.id + '</p></td>'); break; case 'timestamp': - str.push('<td>' + self.formatDate() + '</td>'); break; + str.push('<td class="liberator-sbmcommentsviewer-timestamp">' + self.formatDate() + '</td>'); break; case 'tags': - str.push('<td>' + self.tags.join(',') + '</td>'); break; + str.push('<td class="liberator-sbmcommentsviewer-tags">' + self.tags.join(',') + '</td>'); break; case 'comment': - str.push('<td style="white-space:normal;">' + self.comment + '</td>'); break; + str.push('<td class="liberator-sbmcommentsviewer-comment" style="white-space:normal;">' + self.comment + '</td>'); break; + case 'tagsAndComment': + tagString = self.tags.length ? '[' + self.tags.join('][') + ']':''; + str.push('<td class="liberator-sbmcommentsviewer-tagsAndComment" style="white-space:normal;">' + tagString + ' ' + self.comment + '</td>'); break; default: str.push('<td>-</td>'); } @@ -354,7 +357,8 @@ var manager = { id: 'ID', comment: 'Comment', timestamp: 'TimeStamp', - tags: 'Tags' + tags: 'Tags', + tagsAndComment: 'Tags&Comment' }, // for debug convertMD5: function(str){ |