利用者:Kazutoko/monobook.js
出典: フリー百科事典『ウィキペディア(Wikipedia)』
お知らせ: 保存した後、ブラウザのキャッシュをクリアする必要があります。
- Mozilla / Firefox / Safari: [Shift] を押しながら [再読み込み] をクリック、または [Shift]-[Ctrl]-[R] (Macでは [Cmd]-[Shift]-[R]);
- IE: [Ctrl] を押しながら [更新] をクリック、または [Ctrl]-[F5];
- Konqueror: [再読み込み] をクリック、または [F5]
- Opera: 「ツール」→「設定」からキャッシュをクリア。
// [[User:Dschwen/wikiminiatlas2.js]] - please include this line document.write('<script type="text/javascript" src="' + 'http://ja.wikipedia.org/w/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Dschwen/wikiminiatlas2.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); var wma_settings = { height : 400, width : 700 } function include(s) { document.write('<script type="text/javascript" src="' + 'http://ja.wikipedia.org/w/index.php?title=' + encodeURI(s) + '&action=raw&ctype=text/javascript' + '&dontcountme=s"><' + '/script>'); } // This script is under public domain, and comes with ABSOLUTELY NO WARRANTY. // You can use/modify/redistribute without any permission. function addlogtab() { // get title from URL var u = location.href; if(/[\?&]title=([^&]+)/.test(u)) u = RegExp.$1; else if(/\/wiki\/([^\?]+)/.test(u)) u = RegExp.$1; else return; // insertion point of toolbox var lit = document.getElementById('t-recentchangeslinked'); if(!lit) lit = document.getElementById('t-whatlinkshere'); // if not found, we're in special page if(!lit) return; // insertion point of actions tab var act = document.getElementById('p-cactions'); act = act.getElementsByTagName('ul')[0]; // get namespace number var ns = document.body.className.split(' '); for(var i = 0; i < ns.length; ++i) { var r = /^ns-([0-9]+)$/.exec(ns[i]); if(r) { ns = parseInt(r[1]); break; } } if(typeof ns != 'number') return; // purge cache a = document.createElement('a'); a.appendChild(document.createTextNode('キャッシュを破棄!')); a.setAttribute('href', '/wiki/' + u + '?action=purge'); a.setAttribute('title', decodeURI(u)); li = document.createElement('li'); li.appendChild(a); lit.parentNode.insertBefore(li, lit.nextSibling); // User: or User_talk: if(ns == 2 || ns == 3) { // strip subpage var user = decodeURI(u).replace(/^[^:]+:/, '').replace(/\/.*/, ''); // User's log a = document.createElement('a'); a.appendChild(document.createTextNode('この利用者のログ')); a.setAttribute('href', '/wiki/Special:Log?user=' + encodeURI(user)); a.setAttribute('title', 'User:' + user + "'s log"); li = document.createElement('li'); li.appendChild(a); lit.parentNode.insertBefore(li, lit.nextSibling); // IP address var m = /^\d+\.\d+\.\d+\.\d+$/.exec(user); if(m) { a = document.createElement('a'); a.appendChild(document.createTextNode('このIPアドレスのWHOIS結果')); a.setAttribute('href', 'http://linky.wikipedia.jp/whois?key=' + encodeURI(user)); a.setAttribute('title', 'whois query for ' + user); li = document.createElement('li'); li.appendChild(a); act.appendChild(li); } } // Page log a = document.createElement('a'); a.appendChild(document.createTextNode('このページのログ')); a.setAttribute('href', '/wiki/Special:Log?page=' + u); a.setAttribute('title', decodeURI(u)); li = document.createElement('li'); li.appendChild(a); lit.parentNode.insertBefore(li, lit.nextSibling); // Image: or Image_talk: if((ns == 6 || ns == 7) && location.host != 'commons.wikimedia.org') { var img = u.replace(/^[^:]+:/, (ns == 6 ? 'Image:' : 'Image_talk:')); // link to commons a = document.createElement('a'); a.appendChild(document.createTextNode('Commonsの画像ページ')); a.setAttribute('href', 'http://commons.wikimedia.org/wiki/' + img); a.setAttribute('title', 'commons:' + decodeURI(img)); li = document.createElement('li'); li.appendChild(a); act.appendChild(li); } } addOnloadHook(addlogtab); // This script is under public domain, and comes with ABSOLUTELY NO WARRANTY. // You can use/modify/redistribute without any permission. function addvfd() { var u, p, s, mode; if(!document.getElementById('editform')) return; u = location.href; if(/[\?&]title=([^&]+)/.test(u)) u = RegExp.$1; else if(/\/wiki\/([^\?]+)/.test(u)) u = RegExp.$1; else return; u = decodeURI(u); if(/^Wikipedia:削除依頼\//i.test(u)) mode = 'vfd'; else if(/^Wikipedia:投稿ブロック依頼\//i.test(u)) mode = 'rfb'; else return; p = document.createElement('p'); s = '<select size="1" id="reqInsertSel">'; if(mode == 'vfd') { s += '<option value="vfdDeleted">対処・削除</option>'; s += '<option value="vfdKept">終了・存続</option>'; s += '<option value="vfdConfirmed">確認</option>'; s += '<option value="vfdDeleted2">top&bottom 削除</option>'; s += '<option value="vfdKept2">top&bottom 存続</option>'; } else if(mode == 'rfb') { s += '<option value="rfbBlocked">ブロック</option>'; s += '<option value="rfbKept">ブロックせず</option>'; s += '<option value="rfbLapsed">失効</option>'; } s += '</select> <button type="button" onclick="reqInsert()">挿入</button>'; p.innerHTML = s; s = document.getElementById('contentSub'); s.parentNode.insertBefore(p, s.nextSibling); } function reqInsert() { var e, s, pre, post, a; e = document.getElementById('editform'); s = document.getElementById('reqInsertSel'); switch(s.options[s.selectedIndex].value) { case "vfdDeleted": pre = "\u007B\u007Bsubst:vfd top|削除}}--\u007E\u007E\u007E\u007E\n----"; post = "\u007B\u007Bsubst:vfd bottom}}"; e.wpSummary.value = "対処・削除"; e.wpMinoredit.checked = false; break; case "vfdKept": pre = "\u007B\u007Bsubst:vfd top|存続}}--\u007E\u007E\u007E\u007E\n----"; post = "\u007B\u007Bsubst:vfd bottom}}"; e.wpSummary.value = "終了・存続"; e.wpMinoredit.checked = false; break; case "vfdConfirmed": pre = "\u007B\u007Bsubst:vfd top pdeleted}}"; post = "***(確認)\u007E\u007E\u007E\u007E\n\u007B\u007Bsubst:vfd bottom}}"; e.wpSummary.value = "確認"; e.wpMinoredit.checked = false; break; case "vfdDeleted2": pre = "\u007B\u007Bsubst:vfd top deleted}}"; post = "\u007B\u007Bsubst:vfd bottom}}"; e.wpSummary.value = "t&b 削除"; e.wpMinoredit.checked = true; break; case "vfdKept2": pre = "\u007B\u007Bsubst:vfd top kept}}"; post = "\u007B\u007Bsubst:vfd bottom}}"; e.wpSummary.value = "t&b 存続"; e.wpMinoredit.checked = true; break; case "rfbBlocked": pre = "\u007B\u007Bsubst:rfb top|ブロック}}--\u007E\u007E\u007E\u007E\n----"; post = "\u007B\u007Bsubst:rfb bottom}}"; e.wpSummary.value = "ブロック"; break; case "rfbKept": pre = "\u007B\u007Bsubst:rfb top|ブロックせず}}--\u007E\u007E\u007E\u007E\n----"; post = "\u007B\u007Bsubst:rfb bottom}}"; e.wpSummary.value = "ブロックせず"; break; case "rfbLapsed": pre = "\u007B\u007Bsubst:rfb top|自動失効}}--\u007E\u007E\u007E\u007E\n----"; post = "\u007B\u007Bsubst:rfb bottom}}"; e.wpSummary.value = "失効"; break; default: return; } e.wpTextbox1.value = e.wpTextbox1.value.replace(/^[^\n]+/, "$&\n" + pre) + post + "\n"; e.wpSave.focus(); } addOnloadHook(addvfd); // This script is under public domain, and comes with ABSOLUTELY NO WARRANTY. // You can use/modify/redistribute without any permission. // *** CUSTOMIZE SECTION useralert_message = '注意:これは他の利用者の利用者ページです。編集しても大丈夫ですか?'; // HTML // *** if(!window.$$) document.writeln('<script type="text/javascript" src="http://linky.wikipedia.jp/javascripts/prototype.js"><\/script>'); addOnloadHook(function() { if(wgCanonicalNamespace != 'User') return; if(!$('editform')) return; if(wgUserName == wgTitle.split('/')[0]) return; new Insertion.After('contentSub', '<div class="usermessage" style="display:block">' + useralert_message + '<\/div>'); }); // This script is under public domain, and comes with ABSOLUTELY NO WARRANTY. // You can use/modify/redistribute without any permission. addOnloadHook(function() { if(wgCanonicalNamespace != 'User_talk') return; if(!document.getElementById('editform')) return; var b = document.createElement('button'); b.innerHTML = 'ウェルカムメッセージ'; b.setAttribute('type', 'button'); b.onclick = function() { var e = document.getElementById('editform'); if(e.wpTextbox1.value) e.wpTextbox1.value += "\n"; e.wpTextbox1.value += "\u007B\u007Bsubst:User:Kazutoko/保管倉庫/Template:welcome|Kazutoko|岐阜県|中学生}}--\u007E\u007E\u007E\u007E"; e.wpSummary.value = 'ウィキペディア日本語版へようこそ!'; e.wpSave.focus(); } var p = document.createElement('p'); p.appendChild(b); var s = document.getElementById('contentSub'); s.parentNode.insertBefore(p, s.nextSibling); });