利用者:NiKe/monobook.js
表示
< 利用者:NiKe
お知らせ: 保存した後、ブラウザのキャッシュをクリアしてページを再読み込みする必要があります。
多くの Windows や Linux のブラウザ
- Ctrl を押しながら F5 を押す。
Mac における Safari
Mac における Chrome や Firefox
- ⌘ Cmd と ⇧ Shift を押しながら R を押す。
詳細についてはWikipedia:キャッシュを消すをご覧ください。
var submitchecker_enterpressed = false;
function install_submitchecker() {
var f = document.getElementById("editform");
if(f) {
var s = document.getElementById("wpSummary");
if(s.addEventListener) s.addEventListener("keydown", submitchecker_key, false);
else if(s.attachEvent) s.attachEvent("onkeydown", submitchecker_key);
if(f.addEventListener) f.addEventListener("submit", submitchecker, false);
else if(f.attachEvent) f.attachEvent("onsubmit", submitchecker);
}
}
function submitchecker(e) {
if(submitchecker_enterpressed) {
submitchecker_enterpressed = false;
if(!confirm("Are you sure you want to submit your changes?")) {
if(e.preventDefault) e.preventDefault();
else if(window.event) event.returnValue = false;
return false;
}
}
return true;
}
function submitchecker_key(e) {
if(window.event) e = event;
if(e && e.keyCode == 13) submitchecker_enterpressed = true;
return true;
}
$(install_submitchecker);
// restore helper
function install_restore_helper() {
var e, t, p, b;
if(!(e = document.getElementById('undelete'))) return;
if(!(t = e.getElementsByTagName('h2')[1])) return;
p = document.createElement('p');
b = document.createElement('button');
b.setAttribute('type', 'button');
b.onclick = restore_select_all;
b.appendChild(document.createTextNode('Check all'));
p.appendChild(b);
p.appendChild(document.createTextNode(' '));
b = document.createElement('button');
b.setAttribute('type', 'button');
b.onclick = restore_select_reverse;
b.appendChild(document.createTextNode('Reverse checks'));
p.appendChild(b);
e.insertBefore(p, t.nextSibling);
}
function restore_select_all() {
var e, i;
if(!(e = document.getElementById('undelete'))) return;
e = e.getElementsByTagName('input');
for(i = 0; i < e.length; ++i)
if(e[i].type == 'checkbox') e[i].checked = true;
return false;
}
function restore_select_reverse() {
var e, i;
if(!(e = document.getElementById('undelete'))) return;
e = e.getElementsByTagName('input');
for(i = 0; i < e.length; ++i)
if(e[i].type == 'checkbox') e[i].checked = !e[i].checked;
return false;
}
if(window.attachEvent) window.attachEvent("onload", install_restore_helper);
else if(window.addEventListener) window.addEventListener("load", install_restore_helper, false);
function interlang_title() {
var e, i, s;
if(!(e = document.getElementById('p-lang'))) return;
e = e.getElementsByTagName('a');
for(i = 0; i < e.length; ++i) {
s = e[i].href.replace(/^http:\/\/([^\.]+)[^\/]+\/wiki\//, '$1:');
e[i].title = decodeURI(s.replace(/_/g, ' '));
}
}
if(window.attachEvent) window.attachEvent("onload", interlang_title);
else if(window.addEventListener) window.addEventListener("load", interlang_title, false);
function addlogtab()
{
var u, a, li, lit, ul;
u = location.href;
if(/[\?&]title=([^&]+)/.test(u)) u = RegExp.$1;
else if(/\/wiki\/([^\?]+)/.test(u)) u = RegExp.$1;
else return;
if(/^(%E7%89%B9%E5%88%A5|special):/i.test(u)) return;
a = document.createElement('a');
a.appendChild(document.createTextNode('ログ'));
a.setAttribute('href', '/wiki/%E7%89%B9%E5%88%A5:Log?page=' + u);
a.setAttribute('title', decodeURI(u));
li = document.createElement('li');
li.appendChild(a);
lit = document.getElementById('t-recentchangeslinked');
lit.parentNode.insertBefore(li, lit.nextSibling);
}
if(window.attachEvent) window.attachEvent("onload", addlogtab);
else if(window.addEventListener) window.addEventListener("load", addlogtab, false);