Thành viên:Mnts/monobook.js

Bách khoa toàn thư mở Wikipedia

Cache: Sau khi lưu biểu mẫu này, phải bỏ thông tin vùng đệm (cache) của trình duyệt cho những thay đổi hiện ra được: Mozilla, Firefox, Netscape, Safari: Giữ nút Shift trong khi bấm Reload, hay bấm Ctrl+Shift+R. Internet Explorer: Bấm Ctrl+F5. Opera, Konqueror: Bấm F5.

Nếu bạn viết mã JavaScript, chú ý đọc hướng dẫn để tránh mâu thuẫn với mã mặc định của mạng.

  //  "Kate counter" es un link para tu monobook "personal menu" que premite ver el conteo de tus contibuciones
  //  Add a "Kate counter" link to your monobook "personal menu" list at the very
  //  top of the page.
  //
  //  Indica donde deseas que el "Kate counter" aparesca:
  //    pt-userpage, pt-mytalk, pt-preferences,
  //    pt-watchlist, pt-mycontris, pt-logout
  //
gsKateInsertBefore = 'pt-mycontris'; // leave blank to append after "logout"
  //
function KateLink()
{
  var user = document.getElementById( 'pt-userpage').firstChild.firstChild.data;

  var li = document.createElement( 'li' );
    li.id = 'pt-kate';

    var a = document.createElement( 'a' );
      a.appendChild( document.createTextNode( 'Conteo de contribuciones' ) ); // eh, the css makes the text lowercase
      a.href = 'http://tools.wikimedia.de/~kate/cgi-bin/count_edits?dbname=viwiki_p&user=' + user;

    li.appendChild( a );

  if ( ! gsKateInsertBefore ) // append to end (right) of list
  {  document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
  }
  else
  {  var before = document.getElementById( gsKateInsertBefore );
      before.appendChild( li, before );
  }
}
   if ( window.addEventListener ) window.addEventListener( 'load', KateLink, false );
else if ( window.attachEvent      ) window.attachEvent   ( 'onload', KateLink );