URLいらないのでコメントが見たい。
ので、ちょっと変えてみた。
--- D:/Home/snaka/settings/mozilla/firefox/default/extensions/bookmark@hatena.ne.jp/chrome/content/vimperator/plugin/hatenabookmark.js.backup Tue Oct 05 23:50:31 2010 +++ D:/Home/snaka/settings/mozilla/firefox/default/extensions/bookmark@hatena.ne.jp/chrome/content/vimperator/plugin/hatenabookmark.js Wed Oct 06 00:09:41 2010 @@ -195,27 +195,21 @@ }, adapter: BookmarkAdapter, templateDescription: function (item, text) { + var simpleURL = text.replace(/^https?:\/\//, ''); + if (simpleURL.indexOf('/') == simpleURL.length-1) + simpleURL = simpleURL.replace('/', ''); return <> { !(item.extra && item.extra.length) ? "" : - <span class="extra-info"> - { - template.map(item.extra, function (e) - <><span highlight={e[2]}>{e[1]}</span></>, - <> </>/* Non-breaking space */) - } - </span> + <span class="simpleURL">{simpleURL}</span> } </> }, templateTitleIcon: function (item, text) { - var simpleURL = text.replace(/^https?:\/\//, ''); - if (simpleURL.indexOf('/') == simpleURL.length-1) - simpleURL = simpleURL.replace('/', ''); return <><span highlight="CompIcon">{item.icon ? <img src={item.icon}/> : <></>}</span><span class="td-strut"/>{item.item.title} <span> </span> <a highlight="simpleURL"><span class="extra-info">{ - simpleURL + item.extra[0][1]/*comment*/ }</span></a> </> }, @@ -276,7 +270,7 @@ keys: { text: "url", description: "url", icon: "icon", extra: "extra"}, process: [ plugin.command.templateTitleIcon, - plugin.command.templateDescription, + /*plugin.command.templateDescription, */ ], } context.incomplete = true;
もうちょっと簡単に変更できる方法があってもいいような肝すい。
