MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Kamigraphie
Zur Navigation springen Zur Suche springen
 
(149 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
mwCustomEditButtons[mwCustomEditButtons.length] =
+
 
   {"imageFile": "/rel_jap/w/skins/common/images/no.gif",
+
/*** Bilder-Vorlagenmaske ***/
    "speedTip": "",
+
if ( mw.config.get( 'wgNamespaceNumber') === 6
    "tagOpen": "",
+
  && ( wgPageName.toLowerCase().indexOf('.jpg')!= -1
    "tagClose": "",
+
    || wgPageName.toLowerCase().indexOf('.gif')!= -1
    "sampleText": ""};
+
    || wgPageName.toLowerCase().indexOf('.png')!= -1 )
mwCustomEditButtons[mwCustomEditButtons.length] =
+
   && document.getElementById('wpTextbox1')
  {"imageFile": "/rel_jap/w/skins/common/images/ndash.jpg",
+
  ) {
    "speedTip": "kurzer Bindestrich (n–dash)",
+
var d = new Date();
    "tagOpen": "–",
+
var datum = d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate();
    "tagClose": "",
+
var p = "{{bild " +
    "sampleText": ""};
+
"\n|titel =  <!--freigewählter Titel oder: -->" +
mwCustomEditButtons[mwCustomEditButtons.length] =
+
"\n|titel_j =  <!--Originaltitel jap. , Rōmaji, keine Kanji -->" +
   {"imageFile": "/rel_jap/w/skins/common/images/mdash.jpg",
+
"\n|titel_d =  <!--Originaltitel übersetzt-->" +
    "speedTip": "Text zwischen langen Bindestrichen (m—dash)",
+
"\n|detail = 0  <!-- 0 oder 1 (= „Detail“) -->" +
    "tagOpen": "— ",
+
"\n|genre =    <!-- bitte auswählen: " +
    "tagClose": " ",
+
"\n    Blockdruck Buchillustration Fest Gebäude Grabmal Graphik Hängerollbild " +
    "sampleText": "Text"};
+
"\n    Kalligraphie Kleidungsstück Kultgegenstand Mandala Maske Monument " +
mwCustomEditButtons[mwCustomEditButtons.length] =
+
"\n    Pagode Photographie Plakat Postkarte Querbildrolle Relief " +
  {"imageFile": "/rel_jap/w/skins/common/images/hyphens1_dt.jpg",
+
"\n    Schreingebäude Statue Stich Tempelgebäude Tor Torii Tuschmalerei Zeremonie " +
    "speedTip": "dt. Anführungszeichen einfach",
+
"\n    -->" +
    "tagOpen": "",
+
"\n|genre2 =  <!-- nishiki-e  surimono  shunga  ...  (jap., beliebig erweiterbar )-->" +
    "tagClose": "",
+
"\n|genre2_kanji = " +
    "sampleText": ""};
+
"\n|material =  <!--z.B.: Seide, Papier, Holz, Metall, Stein, " +
mwCustomEditButtons[mwCustomEditButtons.length] =
+
"\n    Bronze, bemalt, vergoldet, Farbe, Tusche  ...-->" +
  {"imageFile": "/rel_jap/w/skins/common/images/hyphens2_dt.jpg",
+
"\n|maße <!-- 25,5 x 19,1 cm ... Höhe: 30,2 cm -->" +
    "speedTip": "dt. Anführungszeichen doppelt",
+
"\n|artist= " +
    "tagOpen": "",
+
"\n|artist_dates =  <!-- 1421–1482 (Bindestrich beachten) -->" +
    "tagClose": "",
+
"\n|periode =    <!-- bitte auswählen: " +
    "sampleText": ""};
+
"\n    Prähistorie Asuka-Zeit Nara-Zeit Heian-Zeit Kamakura-Zeit " +
mwCustomEditButtons[mwCustomEditButtons.length] =
+
"\n    Muromachi-Zeit Momoyama-Zeit Edo-Zeit Meiji-Zeit " +
  {"imageFile": "/rel_jap/w/skins/common/images/oo.jpg",
+
"\n    Taishō-Zeit frühere Showa-Zeit spätere Showa-Zeit Heisei-Zeit " +
    "speedTip": "langes o, klein",
+
"\n    (ggf. auch chin. oder indische Perioden, ...) " +
    "tagOpen": "ō",
+
"\n    -->" +
    "tagClose": "",
+
"\n|jahr =  <!-- 1432 oder 15. Jh. ...--> " +
    "sampleText": ""};
+
"\n|serie =  <!-- ''Japanisch'' (Ü) --> " +
mwCustomEditButtons[mwCustomEditButtons.length] =
+
"\n|buch =  <!-- ''Japanisch'' (Ü) --> " +
   {"imageFile": "/rel_jap/w/skins/common/images/oo_gr.jpg",
+
"\n|serie_j =  <!-- 1831–32 -->" +
    "speedTip": "langes O, gross",
+
"\n|ort =  <!-- (dzt. Aufbewahrung oder Besitz)  --> " +
    "tagOpen": "Ō",
+
"\n|treasure = 0  <!-- 1 → „Jap. Nationalschatz“, " +
    "tagClose": "",
+
"\n      2 → „Weltkulturerbe“, 3 → „Wichtiges Kulturgut“ -->" +
    "sampleText": ""};
+
"\n|q_link =   <!--Link zur Quelle: http://... -->" +
mwCustomEditButtons[mwCustomEditButtons.length] =
+
"\n|q_text =    <!-- Text zur Quelle -->" +
  {"imageFile": "/rel_jap/w/skins/common/images/uu.jpg",
+
"\n|quelle_b =    <!-- Zusatztext zur Quelle--> " +
    "speedTip": "langes u, klein",
+
"\n|quelle_d = " + datum + " <!-- Zugriff --> " +
    "tagOpen": "ū",
+
"\n|collection = " +
    "tagClose": "",
+
"\n|beschreibung =  <!-- freier Text --> " +
    "sampleText": ""};
+
"\n}}";
mwCustomEditButtons[mwCustomEditButtons.length] =
+
 
  {"imageFile": "/rel_jap/w/skins/common/images/uu_gr.jpg",
+
if ( document.getElementById('wpTextbox1').innerHTML === '')
    "speedTip": "langes U, gross",
+
document.getElementById('wpTextbox1').innerHTML = p;
    "tagOpen": "Ū",
+
 
    "tagClose": "",
+
}
    "sampleText": ""};
+
 
mwCustomEditButtons[mwCustomEditButtons.length] =
+
/*** LITERATUR vorlagenmaske***/
   {"imageFile": "/rel_jap/w/skins/common/images/no.gif",
+
if ( mw.config.get( 'wgCanonicalNamespace') === 'Literatur' 
    "speedTip": "",
+
   && document.getElementById('wpTextbox1')
    "tagOpen": "",
+
  && !document.getElementById('wpTextbox1').firstChild
    "tagClose": "",
+
  ) {
    "sampleText": ""};
+
var aut=  wgTitle.replace(/[\s_]*\d+/, '')
mwCustomEditButtons[mwCustomEditButtons.length] =
+
  , year= wgTitle.replace(/\D+[\s_]*/, '');
  {"imageFile": "/rel_jap/w/skins/common/images/ref.jpg",
+
var p = "{{Literatur " +
    "speedTip": "Fussnoten",
+
"\n| code = "+ wgTitle +
    "tagOpen": "<ref>",
+
"\n| autor1_fam = " + aut +
    "tagClose": "</ref>",
+
"\n| autor1_vor = <!-- Vorname --> " +
    "sampleText": "Text"};
+
"\n| autor1_kanji =  " +
mwCustomEditButtons[mwCustomEditButtons.length] =
+
"\n| autor2 = <!-- weitere/r Autor/en, vollständige Namen --> " +
  {"imageFile": "/rel_jap/w/skins/common/images/cat.jpg",
+
"\n| autor_zusatz = <!-- Hg Ü (kein Punkt) --> " +
    "speedTip": "Kategorie",
+
"\n| sprache=  <!-- jap ---> " +
    "tagOpen": "[[Kategorie:",
+
"\n| jahr = " + year +
    "tagClose": "]]",
+
"\n| pub_form = Buch <!-- oder Zeitschrift oder Sammelband --> " +
    "sampleText": " "};
+
"\n| titel1 = <!--Haupttitel --> " +
 +
"\n| titel1_kanji =  " +
 +
"\n| titel2 = <!--Untertitel --> " +
 +
"\n| pdf = <!-- Datei:"+ wgTitle +".pdf --> " +
 +
"\n| link = <!--Link zu externer online-Version --> " +
 +
"\n| sammelband_hg = <!-- bei Sammlband: Herausgeber --> " +
 +
"\n| sammelband_titel = <!-- bei Sammlband: Titel des Bandes--> " +
 +
"\n| sammelband_kanji =  " +
 +
"\n| ort =    " +
 +
"\n| verlag =  " +
 +
"\n| reihe = <!-- Namen der Publikationsreihe, inkl. Bandnr. --> " +
 +
"\n| auflage =  " +
 +
"\n| zeitschrift =  <!-- bei Zeitschrift: Titel und Nummer --> " +
 +
"\n| seiten =  <!-- bei Artikeln, z.B.: 22–44 --> " +
 +
"\n| bemerkung = <!-- z.B.: Erste Auflage 1897 --> " +
 +
"\n| bemerkung2 = {{{1|}}} " +
 +
"\n}}";
 +
 
 +
if ( document.getElementById('wpTextbox1').innerHTML === '')
 +
document.getElementById('wpTextbox1').innerHTML = p;
 +
}
 +
 
 +
/***************************
 +
Change redirect address line
 +
source: https://en.wikipedia.org/wiki/User:Dantman/vector.js
 +
***************************/  
 +
( function ( $, mw ) {
 +
if ( !window.history || !window.history.replaceState ) {
 +
return;
 +
}
 +
 +
mw.loader.using( 'jquery.mwExtension', function () {
 +
var articlePathRE, pathQuery, path;
 +
 +
articlePathRE = new RegExp(
 +
'^' +
 +
$.escapeRE( mw.config.get( 'wgArticlePath' ) ).replace( '\\$1', mw.config.get( 'wgArticlePath' ).indexOf( '?' ) >= -1 ? '([^?]*)' : '([^&]*)' ) +
 +
'$'
 +
);
 +
pathQuery = location.pathname + ( location.search ? '?' + location.search : '' );
 +
// Only execute on paths matching the article path (don't squash query arguments)
 +
if ( articlePathRE.test( pathQuery ) ) {
 +
path = mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) );
 +
path += window.location.hash || '';
 +
window.history.replaceState( {}, document.title, path );
 +
}
 +
} );
 +
 +
}( jQuery, mediaWiki ) );  
 +
 
 
/*********** WIKI GADGETS *****************/
 
/*********** WIKI GADGETS *****************/
 
function PageHomeArrows()
 
function PageHomeArrows()
Zeile 95: Zeile 144:
  
  
 
+
function moveToc() {
///////////////  Search box for Mediawiki  (edit-Maske) ///////////////
+
var toc = document.getElementById("toc") || 0;
// (c) 2006 [[User:Zocky]], released under GPL
+
var tW = toc ? toc.offsetWidth : 0;
//<pre><nowiki>
+
var fW = document.getElementById("footer").offsetWidth;
 
+
var cW = document.getElementById("content").offsetWidth;
importStylesheetURI('http://en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.css&action=raw&ctype=text/css');
+
var abstand = fW-cW;
 
+
var tocR = (cW - (toc.offsetLeft + tW))/2;
var sr$t;
+
if (toc && (tocR < 20) && (abstand > 0) ) {
var sr$f;
+
   toc.style.marginRight = ((tW/2+tocR) < abstand ) ? -(tW/2+tocR)+'px' : -abstand+'px';
var sr$s;
+
}
var sr$r;
+
else toc.style.marginRight = 0;
var sr$w;
 
var sr$i;
 
var sr$re;
 
var sr$mc;
 
 
 
function $e(id) {return document.getElementById(id)}
 
 
 
function srBack()
 
{
 
  if (sr$s.value=='') {sr$t.focus(); return }
 
 
 
  if (sr$re.checked) {
 
    var searchString = sr$s.value;
 
  } else {
 
    searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1');
 
  }
 
 
 
  searchString="("+searchString+")(?![\\s\\S]*"+searchString+")";
 
  if (sr$mc.checked)
 
    var re=new RegExp(searchString);
 
  else
 
    var re=new RegExp(searchString,"i");
 
 
 
  var res = re.exec (sr$t.value.substring(0,sr$t.selectionStart));
 
  if (!res) {
 
    var res = re.exec (sr$t.value)
 
  }
 
 
 
  if (res)
 
   {
 
    sr$t.selectionStart=res.index;
 
    sr$t.selectionEnd=res.index+res[1].length;
 
  }
 
  else sr$t.selectionStart=sr$t.selectionEnd;
 
 
 
  srSync();
 
 
}
 
}
 
+
if (document.getElementById("toc")) moveToc();
function srNext()
 
{
 
  if (sr$s.value=='') {sr$t.focus(); return }
 
 
 
  if (sr$re.checked) {
 
    var searchString = sr$s.value;
 
  } else {
 
    searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1');
 
  }
 
 
 
  if (sr$mc.checked)
 
    var re=new RegExp(searchString,"g");
 
  else
 
    var re=new RegExp(searchString,"gi");
 
 
 
  re.lastIndex=sr$t.selectionEnd;
 
  var res = re.exec (sr$t.value)
 
  if (!res) {
 
    re.lastIndex=0;
 
    var res = re.exec (sr$t.value)
 
  }
 
 
 
  if (res)
 
  {
 
    sr$t.selectionStart=res.index;
 
    sr$t.selectionEnd=res.index+res[0].length;
 
  }
 
  else sr$t.selectionStart=sr$t.selectionEnd;
 
  srSync();
 
}
 
 
 
function srReplace()
 
{
 
 
 
  var sels=sr$t.selectionStart;
 
  var sele=sr$t.selectionEnd;
 
  var selr=sr$t.value.length-sele;
 
 
 
  if (sr$s.value=='' || sels==sele) {sr$t.focus(); return }
 
 
 
  if (sr$re.checked) {
 
    var searchString = sr$s.value;
 
    var replaceString = sr$r.value;
 
 
 
  } else {
 
    searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1');
 
    replaceString=sr$r.value.replace(/([\$\\])/g,'\\$1');
 
  }
 
 
 
  if (sr$mc.checked)
 
    var re=new RegExp(searchString,"g");
 
  else
 
    var re=new RegExp(searchString,"gi");
 
 
 
  re.lastIndex=sels;
 
  var res = re.exec (sr$t.value);
 
  var $$=0;
 
  if (res && res.index==sels && res[0].length==sele-sels)
 
  {
 
    if (sr$re.checked) {
 
      replaceString=replaceString.replace(/\\\\/g,'&backslash;');
 
      var replaceBits=(" "+replaceString).split(/(?=\$\d)/);
 
      replaceString=replaceBits[0].substring(1);
 
      for (var i=1; i<replaceBits.length; i++)
 
      {
 
        $$=replaceBits[i][1]-'0';
 
        if ($$<res.length)
 
          replaceString += res[$$] + replaceBits[i].substring(2)
 
        else
 
          replaceString += replaceBits[i];
 
    }
 
    replaceString=replaceString.replace (/\\n/,"\n").replace (/&backslash;/g,"\\").replace
 
                                        (/&dollar;/g,"\$")
 
 
 
    }
 
    sr$t.value= sr$t.value.substring(0,sels) + replaceString + sr$t.value.substring(sele);
 
  }
 
 
 
  sr$t.selectionStart=sels;
 
  sr$t.selectionEnd=sr$t.value.length-selr;
 
  srSync();
 
}
 
 
 
 
 
function srReplaceall()
 
{
 
  if (!sr$s.value) {sr$t.focus(); return }
 
 
 
  var sels=sr$t.selectionStart;
 
  var sele=sr$t.selectionEnd;
 
  var selr=sr$t.value.length-sele;
 
 
 
  var reps;
 
 
 
  if (sr$re.checked) {
 
    var searchString = sr$s.value;
 
    var replaceString = sr$r.value.replace(/\\\\/,'&backslash;').replace(/\\n/,'\n').replace(/&backslash;/,"\\");
 
  } else {
 
    searchString=sr$s.value.replace(/([\[\]\{\}\|\.\*\?\(\)\$\^\\])/g,'\\$1');
 
    replaceString=sr$r.value.replace(/([\$\\])/g,'\\$1');
 
  }
 
 
 
  if (sele>sels)
 
    reps=sr$t.value.substring(sels,sele);
 
  else
 
    reps=sr$t.value;
 
 
  if (sr$mc.checked)
 
    var re=new RegExp(searchString,"g");
 
  else
 
    var re=new RegExp(searchString,"gi");
 
 
 
  var replaceCounter=0;
 
 
 
  var replaceFunc=function(){replaceCounter++;return replaceString};
 
 
 
  reps=reps.replace(re,replaceFunc);
 
 
 
  if (sele>sels)
 
    sr$t.value = sr$t.value.substring(0,sels) + reps + sr$t.value.substring(sele);
 
  else
 
    sr$t.value = reps;
 
 
 
  sr$t.selectionStart=sels;
 
  sr$t.selectionEnd=sele>sels ? sr$t.value.length-selr : sels;
 
  window.status = replaceCounter+" ocurrences of " + searchString + " replaced.";
 
  srSync();
 
}
 
 
 
function srToggleCase()
 
{
 
  var sels=sr$t.selectionStart;
 
  var sele=sr$t.selectionEnd;
 
  var selr=sr$t.value.length-sele;
 
  var selt=sr$t.value.substring(sels,sele);
 
 
 
  if (sele>sels)
 
  {
 
    if (selt==selt.toUpperCase())
 
      selt=selt.toLowerCase()
 
    else if (selt==selt.toLowerCase() && sele-sels>1)
 
      selt=selt.substring(0,1).toUpperCase()+selt.substring(1).toLowerCase()
 
    else
 
      selt=selt.toUpperCase();
 
 
 
    sr$t.value = sr$t.value.substring(0,sels) + selt + sr$t.value.substring(sele);
 
    sr$t.selectionStart=sels;
 
    sr$t.selectionEnd=sele>sels ? sr$t.value.length-selr : sels;
 
  }
 
  srSync();
 
}
 
 
 
 
 
function srSync()
 
{
 
    var i;
 
    var allLines=0;
 
    var lineNo=0;
 
    var w=sr$t.cols-5;
 
 
 
    var dummy=sr$t.value.split("\n");
 
    for (i=0;i<dummy.length;i++){allLines+=Math.ceil(dummy[i].length/w)}
 
 
 
    var dummy=sr$t.value.substring(0,sr$t.selectionStart).split("\n");
 
    for (i=0;i<dummy.length;i++){lineNo+=Math.ceil(dummy[i].length/w)}
 
 
 
//    alert (w+" "+lineNo+"/"+allLines);
 
 
 
    sr$t.scrollTop=sr$t.scrollHeight*(lineNo-10)/allLines;
 
    sr$t.focus();
 
}
 
 
 
 
 
function srInit()
 
{
 
 
 
  if($e('wpTextbox1')) {
 
   
 
var srBoxCode ='<div id="srForm"><table id="srBox" cellpadding="0" cellspacing="2"><tr>'
 
          +'<td></td>'
 
          +'<td valign="middle">'
 
          +'<input type="checkbox" id="srCase" onclick="sr$t.focus()" tabindex="10"/><small><span style="color:#000000;">match case</span</small>&nbsp;'
 
          +'<input type="checkbox" id="srRegexp" onclick="sr$t.focus()" tabindex="11"/><small><span style="color:#000000;">use regexp</span></small>&nbsp;&nbsp;'
 
          +'<a href="javascript:srBack()" onmouseover="sr$t.focus()" title="find previous match [alt-2]" accesskey="2">&lt;</a>&nbsp;'
 
          +'<a href="javascript:srNext()" onmouseover="sr$t.focus()" title="find next match [alt-3]" accesskey="3">find&nbsp;&nbsp;&gt;</a>&emsp;'
 
          +'<a href="javascript:srReplace();srBack()" onmouseover="sr$t.focus()" title="replace and find previous match [alt-4]" accesskey="4">&lt;</a>&nbsp;'
 
          +'<a href="javascript:srReplace()" onmouseover="sr$t.focus()" title="replace this match">replace</a>&nbsp;'
 
          +'<a href="javascript:srReplace();srNext()" onmouseover="sr$t.focus()" title="replace and find next match [alt-5]" accesskey="5">&gt;</a>&emsp;'
 
          +'<a href="javascript:srReplaceall()" onmouseover="sr$t.focus()" title="replace all matches [alt-7]" accesskey="7">replace&nbsp;all</a>&emsp;'
 
          +'</td>'
 
          +'</tr><tr>'
 
          +'<td valign="bottom"><small><span style="color:#000000;">search for:</span></small></td>'
 
          +'<td valign="bottom"><input type="text" id="srSearch" accesskey="F" tabindex="8" onkeypress="event.which == 13 && srNext()"; value=""/></td>'
 
          +'</tr><tr>'
 
          +'<td valign="bottom"><small><span style="color:#000000;">replace with:</span></small></td>'
 
          +'<td valign="bottom"><input type="text" id="srReplace" accesskey="G" tabindex="9" onkeypress="event.which == 13 && srNext()"; value=""/></td>'
 
          +'</tr></table></div>'
 
 
 
    var ep=$e('searchInput');
 
    if (ep) ep.accessKey='none';
 
 
 
    sr$t=document.editform.wpTextbox1;
 
    sr$w=sr$t.style.width;
 
 
 
    var sr=document.createElement('div');
 
    sr.innerHTML=srBoxCode;
 
 
 
    var im=document.createElement('span');
 
    im.innerHTML='<a id="SearchIcon" href="javascript:srShowHide()"><img style="cursor: pointer;" title="Search/Replace" alt="Search/Replace" src="http://upload.wikimedia.org/wikipedia/en/1/12/Button_find.png" border="0" height="22" width="23"></a><a href="javascript:srToggleCase()"><img style="cursor: pointer;" title="Toggle case" alt="Toggle case" src="http://upload.wikimedia.org/wikipedia/en/1/12/Button_case.png" border="0" height="22" width="23"></a>';
 
 
 
    var ep=$e('toolbar');
 
    if (ep)
 
    {
 
      ep.appendChild(im)
 
    }
 
    else
 
    {
 
      var ep=$e('editform');
 
      ep.parentNode.insertBefore(im,ep);
 
    }
 
 
 
    sr$i=$e('SearchIcon');
 
    sr$i.accessKey="F";
 
    sr.firstChild.style.display='none';
 
 
 
 
 
    var ep=$e('editform');
 
    ep.parentNode.insertBefore(sr,ep);
 
 
 
    sr$f=$e('srForm');
 
    sr$s=$e('srSearch');
 
    sr$r=$e('srReplace');
 
    sr$re=$e('srRegexp');
 
    sr$mc=$e('srCase');
 
 
 
  }
 
}
 
 
 
function srShowHide()
 
{
 
  if (sr$f.style.display=='none')
 
  {
 
    sr$f.style.display='block';
 
    sr$i.accessKey="none";
 
    sr$t.style.width='auto';
 
    sr$s.focus();
 
  }
 
  else
 
  {
 
    sr$f.style.display='none';
 
    sr$t.style.width=sr$w;
 
    sr$i.accessKey="F";
 
  }
 
}
 
 
 
addOnloadHook(srInit);
 
//</nowiki></pre>
 

Aktuelle Version vom 31. März 2023, 09:46 Uhr

/*** Bilder-Vorlagenmaske ***/
if ( mw.config.get( 'wgNamespaceNumber') === 6
  && ( wgPageName.toLowerCase().indexOf('.jpg')!= -1
     || wgPageName.toLowerCase().indexOf('.gif')!= -1
     || wgPageName.toLowerCase().indexOf('.png')!= -1 )
  && document.getElementById('wpTextbox1')
  ) {
var d = new Date();
var datum = d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate();
var p = "{{bild " +
 "\n|titel =   <!--freigewählter Titel oder: -->" +
 "\n|titel_j =   <!--Originaltitel jap. , Rōmaji, keine Kanji -->" +
 "\n|titel_d =   <!--Originaltitel übersetzt-->" +
 "\n|detail = 0   <!-- 0 oder 1 (= „Detail“) -->" +
 "\n|genre =    <!-- bitte auswählen: " +
 "\n    Blockdruck Buchillustration Fest Gebäude Grabmal Graphik Hängerollbild " +
 "\n    Kalligraphie Kleidungsstück Kultgegenstand Mandala Maske Monument " +
 "\n    Pagode Photographie Plakat Postkarte Querbildrolle Relief " +
 "\n    Schreingebäude Statue Stich Tempelgebäude Tor Torii Tuschmalerei Zeremonie " +
 "\n    -->" +
 "\n|genre2 =  <!-- nishiki-e  surimono  shunga  ...  (jap., beliebig erweiterbar )-->" +
 "\n|genre2_kanji = " +
 "\n|material =   <!--z.B.: Seide, Papier, Holz, Metall, Stein, " +
 "\n    Bronze, bemalt, vergoldet, Farbe, Tusche  ...-->" +
 "\n|maße =   <!-- 25,5 x 19,1 cm ... Höhe: 30,2 cm -->" +
 "\n|artist= " +
 "\n|artist_dates =   <!-- 1421–1482 (Bindestrich beachten) -->" +
 "\n|periode =    <!-- bitte auswählen: " +
 "\n    Prähistorie Asuka-Zeit Nara-Zeit Heian-Zeit Kamakura-Zeit " +
 "\n    Muromachi-Zeit Momoyama-Zeit Edo-Zeit Meiji-Zeit " +
 "\n    Taishō-Zeit frühere Showa-Zeit spätere Showa-Zeit Heisei-Zeit " +
 "\n    (ggf. auch chin. oder indische Perioden, ...) " +
 "\n    -->" +
 "\n|jahr =   <!-- 1432 oder 15. Jh. ...--> " +
 "\n|serie =   <!-- ''Japanisch'' (Ü) --> " +
 "\n|buch =   <!-- ''Japanisch'' (Ü) --> " +
 "\n|serie_j =   <!-- 1831–32 -->" +
 "\n|ort =   <!-- (dzt. Aufbewahrung oder Besitz)  --> " +
 "\n|treasure = 0  <!-- 1 → „Jap. Nationalschatz“, " +
 "\n      2 → „Weltkulturerbe“, 3 → „Wichtiges Kulturgut“ -->" +
 "\n|q_link =    <!--Link zur Quelle: http://... -->" +
 "\n|q_text =    <!-- Text zur Quelle -->" +
 "\n|quelle_b =    <!-- Zusatztext zur Quelle--> " +
 "\n|quelle_d = " + datum + " <!-- Zugriff --> " +
 "\n|collection = " +
 "\n|beschreibung =   <!-- freier Text --> " +
 "\n}}";

if ( document.getElementById('wpTextbox1').innerHTML === '')
 document.getElementById('wpTextbox1').innerHTML = p;

}

/*** LITERATUR vorlagenmaske***/
if ( mw.config.get( 'wgCanonicalNamespace') === 'Literatur'  
  && document.getElementById('wpTextbox1')
  && !document.getElementById('wpTextbox1').firstChild
  ) {
var aut=  wgTitle.replace(/[\s_]*\d+/, '')
  , year= wgTitle.replace(/\D+[\s_]*/, '');
var p = "{{Literatur " + 
"\n| code = "+ wgTitle + 
"\n| autor1_fam = " + aut +
"\n| autor1_vor = <!-- Vorname --> " + 
"\n| autor1_kanji =  " + 
"\n| autor2 = <!-- weitere/r Autor/en, vollständige Namen --> " +
"\n| autor_zusatz = <!-- Hg Ü (kein Punkt) --> " +
"\n| sprache=  <!-- jap ---> " +
"\n| jahr = " + year +
"\n| pub_form = Buch <!-- oder Zeitschrift oder Sammelband --> " +
"\n| titel1 = <!--Haupttitel --> " +
"\n| titel1_kanji =  " +
"\n| titel2 = <!--Untertitel --> " +
"\n| pdf = <!-- Datei:"+ wgTitle +".pdf --> " +
"\n| link = <!--Link zu externer online-Version --> " +
"\n| sammelband_hg = <!-- bei Sammlband: Herausgeber --> " +
"\n| sammelband_titel = <!-- bei Sammlband: Titel des Bandes--> " +
"\n| sammelband_kanji =  " +
"\n| ort =    " +
"\n| verlag =   " +
"\n| reihe = <!-- Namen der Publikationsreihe, inkl. Bandnr. --> " +
"\n| auflage =  " +
"\n| zeitschrift =  <!-- bei Zeitschrift: Titel und Nummer --> " +
"\n| seiten =  <!-- bei Artikeln, z.B.: 22–44 --> " +
"\n| bemerkung = <!-- z.B.: Erste Auflage 1897 --> " +
"\n| bemerkung2 = {{{1|}}} " +
 "\n}}";

if ( document.getElementById('wpTextbox1').innerHTML === '')
 document.getElementById('wpTextbox1').innerHTML = p; 
}

/***************************
Change redirect address line 
source: https://en.wikipedia.org/wiki/User:Dantman/vector.js
***************************/ 
( function ( $, mw ) {
	if ( !window.history || !window.history.replaceState ) {
		return;
	}
 
	mw.loader.using( 'jquery.mwExtension', function () {
		var articlePathRE, pathQuery, path;
 
		articlePathRE = new RegExp(
			'^' +
			$.escapeRE( mw.config.get( 'wgArticlePath' ) ).replace( '\\$1', mw.config.get( 'wgArticlePath' ).indexOf( '?' ) >= -1 ? '([^?]*)' : '([^&]*)' ) +
			'$'
		);
		pathQuery = location.pathname + ( location.search ? '?' + location.search : '' );
		// Only execute on paths matching the article path (don't squash query arguments)
		if ( articlePathRE.test( pathQuery ) ) {
			path = mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) );
			path += window.location.hash || '';
			window.history.replaceState( {}, document.title, path );
		}
	} );
 
}( jQuery, mediaWiki ) ); 

/*********** WIKI GADGETS *****************/
function PageHomeArrows()
{
        //if (!wgNamespaceNumber || wgNamespaceNumber <100) return;
        var c = document.getElementById("bodyContent") || document.getElementById("mw_content") || document.getElementById("article");
        if (!c) return;
        for (var level = 2; level <= 3; ++level) {
                var h = c.getElementsByTagName("h" + level);
                for (var i = 0; i < h.length; ++i) {
                        var mwh = h[i].lastChild; // moveEditsection not run yet
                        if (mwh && mwh.className == "mw-headline" && mwh.offsetTop>screen.availHeight) {
                                var arrow = document.createElement("a");
                                arrow.className = "toparrow noprint";
                                arrow.title= "zum Seitenanfang";
                                arrow.appendChild(document.createTextNode("top↑"));
                                arrow.href = "javascript:window.scrollTo(0,0); void 0;";
                                mwh.insertBefore(arrow, mwh.firstChild);
                        }
                }
        }
}
addOnloadHook(PageHomeArrows);


function moveToc() {
 var toc = document.getElementById("toc") || 0;
 var tW = toc ? toc.offsetWidth : 0;
 var fW = document.getElementById("footer").offsetWidth;
 var cW = document.getElementById("content").offsetWidth;
 var abstand = fW-cW;
 var tocR = (cW - (toc.offsetLeft + tW))/2;
 if (toc && (tocR < 20) && (abstand > 0) ) {
  toc.style.marginRight = ((tW/2+tocR) < abstand ) ? -(tW/2+tocR)+'px' : -abstand+'px';  
 }
 else toc.style.marginRight = 0;
}
if (document.getElementById("toc")) moveToc();