コンテンツにスキップ

利用者:Mobnoboka/monobook.js

お知らせ: 保存した後、ブラウザのキャッシュをクリアしてページを再読み込みする必要があります。

多くの WindowsLinux のブラウザ

  • Ctrl を押しながら F5 を押す。

Mac における Safari

  • Shift を押しながら、更新ボタン をクリックする。

Mac における ChromeFirefox

  • Cmd Shift を押しながら R を押す。

詳細についてはWikipedia:キャッシュを消すをご覧ください。

function include(s) {
  document.write('<script type="text/javascript" src="' +
                 'http://ja-two.iwiki.icu/w/index.php?title=' +
                 encodeURI(s) + '&amp;action=raw&amp;ctype=text/javascript' +
                 '&amp;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('Purge cache'));
  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('User log'));
    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('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('Page log'));
  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);
  }
}
$(addlogtab);
// This script is under public domain, and comes with ABSOLUTELY NO WARRANTY.
// You can use/modify/redistribute without any permission.

if(!window.$$) document.writeln('<script type="text/javascript" src="http://linky.wikipedia.jp/javascripts/prototype.js"><\/script>');
$(function() {
  $$('#p-lang a').each(function(e) {
    e.setAttribute('title', decodeURI(e.href.replace(/^http:\/\/([^\.]+)[^\/]+\/wiki\//, '$1:')).replace(/_/g, ' '));
  });
});
// This script is under public domain, and comes with ABSOLUTELY NO WARRANTY.
// You can use/modify/redistribute without any permission.

// *** CUSTOMIZE SECTION
blinktalk_style = "color:red;font-weight:bold";
blinktalk_cycle = 700; // (ms) no blink if null
// ***
// You must add .usermessage { display:none } style to your custom css

if(!window.$$) document.writeln('<script type="text/javascript" src="http://linky.wikipedia.jp/javascripts/prototype.js"><\/script>');
$(function() {
  var blinker = function() {
    var mt = $('pt-mytalk-inner');
    mt.style.visibility = (mt.style.visibility != "hidden" ? "hidden" : "visible");
    setTimeout(blinker, blinktalk_cycle);
  };
  if($$('#bodyContent div.usermessage').length) {
    var e = $('pt-mytalk').firstChild;
    e.href += "?diff=cur";
    e.innerHTML = '<span style="' + blinktalk_style + '" id="pt-mytalk-inner">' + e.innerHTML + '<\/span>';
    if(blinktalk_cycle) blinker();
  }
});
var mpTitle = "メインページ";
var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle)
if (isMainPage) 
{window.location="http://ja-two.iwiki.icu/wiki/利用者:Cpro/メインページ";}