vimperatorのstatuslineが嘘みたいに使いやすくなる夢を見た

// 使用は自己責任。
// 参考: http://d.hatena.ne.jp/teramako/20071205/p1
// 勉強したい。偉い人、添削、頼む。
// 追記(2008-10-28T07:12:06+09:00): version は 1.2 

// statusline に favicon を表示
(function() {
  var p = document.createElement('statusbarpanel');
  var b = document.getElementById('page-proxy-favicon');
  p.setAttribute('id','page-proxy-favicon-clone');
  p.appendChild(b.cloneNode(true));
  b.parentNode.removeChild(b);
  document.getElementById('status-bar').insertBefore(p,document.getElementById('liberator-statusline'));
})();

// statusline の [+-] をわかりやすい位置にわかりやすく表示
(function() {
var p = document.createElement('statusbarpanel');
var l = document.getElementById('liberator-statusline-field-tabcount').cloneNode(false);
l.setAttribute('id', 'liberator-statusline-field-history');
l.setAttribute('value', '  ');
p.appendChild(l);
document.getElementById('status-bar').insertBefore(p,
  document.getElementById('liberator-statusline'));
getBrowser().addEventListener("load", function() {
  var e = document.getElementById('liberator-statusline-field-history');
  var h = getWebNavigation().sessionHistory;
  h = (h.index > 0 ? "<" : " ") + (h.index < h.count - 1 ? ">" : " ");
  e.setAttribute('value', h);
}, true);
getBrowser().addEventListener("TabSelect", function() {
  var e = document.getElementById('liberator-statusline-field-history');
  var h = getWebNavigation().sessionHistory;
  h = (h.index > 0 ? "<" : " ") + (h.index < h.count - 1 ? ">" : " ");
  e.setAttribute('value', h);
}, true);
})();