利用者:March/monobook.js
表示
お知らせ: 保存した後、ブラウザのキャッシュをクリアしてページを再読み込みする必要があります。
多くの Windows や Linux のブラウザ
- Ctrl を押しながら F5 を押す。
Mac における Safari
Mac における Chrome や Firefox
- ⌘ Cmd と ⇧ Shift を押しながら R を押す。
詳細についてはWikipedia:キャッシュを消すをご覧ください。
addnav=function(){ //ナビボックス項目追加
try{
document.getElementById("p-nav").getElementsByTagName("div")[0].innerHTML += ('\
<hr>\
<ul>\
<li><a href="/wiki/Wikipedia:井戸端" target="_blank">井戸端</a></li>\
<li><a href="/wiki/Wikipedia:スタイルマニュアル" target="_blank">スタイル</a></li>\
<li><a href="/wiki/Wikipedia:記事名の付け方" target="_blank">命名規則</a></li>\
<li><a href="/wiki/Wikipedia:Template メッセージの一覧" target="_blank">テンプレート</a></li>\
<li><a href="/wiki/Wikipedia:Wikipedia空間内の文書一覧" target="_blank">文書一覧</a></li>\
<li><a href="http://taurus.kake.info.waseda.ac.jp/wikip/joyful/joyful.u.cgi" target="_blank">井戸端BBS</a></li>\
</ul>');
}catch(e){
//エラーは無視する
}
}
inst_checker=function(){ //非推奨文字排除
var f=document.getElementById("editform");
if(f){
f.onsubmit = function(){
var fchars={
"\uFF0C":"\u3001","\uFF0E":"\u3002",
"\uFF10":"0","\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5",
"\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\uFF21":"A","\uFF22":"B",
"\uFF23":"C","\uFF24":"D","\uFF25":"E","\uFF26":"F","\uFF27":"G","\uFF28":"H",
"\uFF29":"I","\uFF2A":"J","\uFF2B":"K","\uFF2C":"L","\uFF2D":"M","\uFF2E":"N",
"\uFF2F":"O","\uFF30":"P","\uFF31":"Q","\uFF32":"R","\uFF33":"S","\uFF34":"T",
"\uFF35":"U","\uFF36":"V","\uFF37":"W","\uFF38":"X","\uFF39":"Y","\uFF3A":"Z",
"\uFF41":"a","\uFF42":"b","\uFF43":"c","\uFF44":"d","\uFF45":"e","\uFF46":"f",
"\uFF47":"g","\uFF48":"h","\uFF49":"i","\uFF4A":"j","\uFF4B":"k","\uFF4C":"l",
"\uFF4D":"m","\uFF4E":"n","\uFF4F":"o","\uFF50":"p","\uFF51":"q","\uFF52":"r",
"\uFF53":"s","\uFF54":"t","\uFF55":"u","\uFF56":"v","\uFF57":"w","\uFF58":"x",
"\uFF59":"y","\uFF5A":"z",
"\uFF61":"\u3002","\uFF62":"\u300C","\uFF63":"\u300D","\uFF64":"\u3001","\uFF65":"\u30FB",
"\uFF66":"\u30F2","\uFF67":"\u30A1","\uFF68":"\u30A3","\uFF69":"\u30A5","\uFF6A":"\u30A7",
"\uFF6B":"\u30A9","\uFF6C":"\u30E3","\uFF6D":"\u30E5","\uFF6E":"\u30E7","\uFF6F":"\u30C3",
"\uFF70":"\u30FC","\uFF71":"\u30A2","\uFF72":"\u30A4","\uFF73":"\u30A6","\uFF74":"\u30A8",
"\uFF75":"\u30AA","\uFF76":"\u30AB","\uFF77":"\u30AD","\uFF78":"\u30AF","\uFF79":"\u30B1",
"\uFF7A":"\u30B3","\uFF7B":"\u30B5","\uFF7C":"\u30B7","\uFF7D":"\u30B9","\uFF7E":"\u30BB",
"\uFF7F":"\u30BD","\uFF80":"\u30BF","\uFF81":"\u30C1","\uFF82":"\u30C4","\uFF83":"\u30C6",
"\uFF84":"\u30C8","\uFF85":"\u30CA","\uFF86":"\u30CB","\uFF87":"\u30CC","\uFF88":"\u30CD",
"\uFF89":"\u30CE","\uFF8A":"\u30CF","\uFF8B":"\u30D2","\uFF8C":"\u30D5","\uFF8D":"\u30D8",
"\uFF8E":"\u30DB","\uFF8F":"\u30DE","\uFF90":"\u30DF","\uFF91":"\u30E0","\uFF92":"\u30E1",
"\uFF93":"\u30E2","\uFF94":"\u30E4","\uFF95":"\u30E6","\uFF96":"\u30E8","\uFF97":"\u30E9",
"\uFF98":"\u30EA","\uFF99":"\u30EB","\uFF9A":"\u30EC","\uFF9B":"\u30ED","\uFF9C":"\u30EF",
"\uFF9D":"\u30F3","\uFF9E":"\u309B","\uFF9F":"\u309C","\u339E":"km","\u3316":"km"};
var textarea=document.getElementById("editform").getElementsByTagName("textarea")[0];
for(var fchar in fchars){
if(textarea.value.match(fchar)){
if(confirm("推奨されない文字を含んでいます: "+fchar+"\n置換しますか?")){
textarea.value=textarea.value.replace(new RegExp(fchar,"g"),fchars[fchar]);
}
}
}
}
}
}
yearTable=function(){
var c=function(s,n,f){
var i,w;
for(i=1;i<=f;i++){
w+='<option value="'+(s+i-1)+'">'+n+(i<10?'0':'')+i+'年 - '+(s+i-1)+'年</option>';
}
return w;
}
//b=document.getElementById("toolbar");
try{
document.getElementById("toolbar").innerHTML += ('\
<select id="years" style="height:22px;">'+
c(1868,"明治",44)+c(1912,"大正",14)+c(1926,"昭和",63)+c(1989,"平成",20)
+'</select>\
<button style="height:22px;width:23px;" onClick="insertTags(\'[[\'+years.value+\'年|\',\']]\',\'\');">入</button>');
}catch(e){
//エラーは無視する
}
}
editlink = function(){
try{
document.getElementById("ca-edit").style.marginRight = '0';
document.getElementById("ca-edit").outerHTML = document.getElementById("ca-edit").outerHTML + ('\
<li style="margin-left:0;width:10px"><a title="見出しより上を編集" href="'+document.getElementById("ca-edit").all[0].href+'§ion=0" style="padding-left:0.4em;padding-right:0.4em;">#</a></li>\
');
}catch(e){
//エラーは無視する
}
}
window.onload = function(){
addnav();
yearTable();
editlink();
if(document.body.className == "ns-0") inst_checker();
}