コンテンツにスキップ

利用者:Hideki1976/jastylespecial.js

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

多くの WindowsLinux のブラウザ

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

Mac における Safari

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

Mac における ChromeFirefox

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

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

// jastylespecial
var jastylespecial_version = '0.0.1';
jastyle_autostyle_namespaces = [ '', 'Category', 'Template', 'Portal', 'Help' ];

if(!window.$$) document.writeln('<script type="text/javascript" src="http://linky.wikipedia.jp/javascripts/prototype.js"><\/script>');

function jastyle() {
  if($('dontstylespecial') && $F('dontstylespecial')) return;
  
  var strips = new Array();
  var edit = $('wpTextbox1');
  var out = edit.value.
  
  replace(/PRIDE無差別級グランプリ2006 決勝戦/g, '[[PRIDE 無差別級グランプリ 2006 決勝戦]]').
  replace(/PRIDE無差別級グランプリ 2006 決勝戦/g, '[[PRIDE 無差別級グランプリ 2006 決勝戦]]').
  replace(/PRIDE無差別級グランプリ2006 2nd ROUND/g, '[[PRIDE 無差別級グランプリ 2006 2nd ROUND]]').
  replace(/PRIDE無差別級グランプリ 2006 2nd ROUND/g, '[[PRIDE 無差別級グランプリ 2006 2nd ROUND]]').
  replace(/PRIDE無差別級グランプリ2006 開幕戦/g, '[[PRIDE 無差別級グランプリ 2006 開幕戦]]').
  replace(/PRIDE無差別級グランプリ 2006 開幕戦/g, '[[PRIDE 無差別級グランプリ 2006 開幕戦]]').
  replace(/PRIDE武士道 -其の弐-/g, '[[PRIDE 武士道 -其の弐-]]').
  replace(/PRIDE武士道 -其の参-/g, '[[PRIDE 武士道 -其の参-]]').
  replace(/PRIDE武士道 -其の四-/g, '[[PRIDE 武士道 -其の四-]]').
  replace(/PRIDE武士道 -其の伍-/g, '[[PRIDE 武士道 -其の伍-]]').
  replace(/PRIDE武士道 -其の六-/g, '[[PRIDE 武士道 -其の六-]]').
  replace(/PRIDE武士道 -其の七-/g, '[[PRIDE 武士道 -其の七-]]').
  replace(/PRIDE武士道 -其の八-/g, '[[PRIDE 武士道 -其の八-]]').
  replace(/PRIDE武士道 -其の九-/g, '[[PRIDE 武士道 -其の九-]]').
  replace(/PRIDE武士道 -其の拾-/g, '[[PRIDE 武士道 -其の拾-]]').
  replace(/PRIDE武士道 -其の十一-/g, '[[PRIDE 武士道 -其の十一-]]').
  replace(/PRIDE武士道 -其の十二-/g, '[[PRIDE 武士道 -其の十二-]]').
  replace(/PRIDE武士道 -其の十三-/g, '[[PRIDE 武士道 -其の十三-]]');
  
  // unstrip
  ////out = out.replace(/<!--@@ jastyle-STRIP-(\d+) @@-->/g,
  ////                    function(str, n) { return strips[n]; });
  
  edit.value = out + "\n";
  return true;
}

$(function() {
  var html = '';
  if(!$('editform')) return;
  if($A(jastyle_autostyle_namespaces).include(wgCanonicalNamespace)) {
    Event.observe('editform', 'submit', jastyle);
    //「使用しない」チェックをつけておく
    html += '<label for="dontstylespecial"><input type="checkbox" id="dontstylespecial" value="1" checked />使用しない</label> ';
  }
  html += '<button type="button" onclick="jastylespecial()">stylespecial</button>';
  html += ' (jastyle version ' + jastylespecial_version + ')';
  new Insertion.Before('editform', '<p>' + html + '</p>');
});