FSWikiに自動ログインすんのとメニュー追加するスクリプト

http://konbu.s13.xrea.com/wiki/ 以下のページにアクセスするたびに、ログインアクションを送る。idとパスワードはスクリプト内にベタ書き。こーいうの手軽に自分で書けるのがGreaseMonkeyのいいところだと思う。今更な発言。

// ==UserScript==
// @name           adminmenu
// @namespace      adminmenu
// @description    admin menu@konbu.s13.xrea.com
// @include        http://konbu.s13.xrea.com/wiki/*
// ==/UserScript==

GM_xmlhttpRequest({
  method: 'POST',
  headers: {'Content-Type': 'application/x-www-form-urlencoded'},
  url: "http://konbu.s13.xrea.com/wiki/index.cgi",
  data: "id=hogeid&pass=hogepass&action=LOGIN",
  onload: function(res){}
});
adminmenu = document.getElementById("admin_menu");
menu =
['<a href="index.cgi?action=NEW" rel="nofollow">New</a> ',
  '<a href="index.cgi?action=LIST">List</a> ',
  '<a href="index.cgi?action=SEARCH" rel="nofollow">Search</a> ',
  '<a href="'+location.href+'&action=EDIT">Edit</a> ',
  '<a href="index.cgi?page=Help">Help</a> ',
  '<a href="index.cgi?action=RSS" rel="nofollow">RSS</a> ',
  '<a href="index.cgi?action=LOGIN">Admin Menu</a> '];
for(index in menu) adminmenu.innerHTML += menu[index];

test