Benutzer:CF/monobook.js: Unterschied zwischen den Versionen

aus Stargate Wiki, dem deutschsprachigen Stargate-Lexikon
Zur Navigation springen Zur Suche springen
CF (Diskussion | Beiträge)
KKeine Bearbeitungszusammenfassung
CF (Diskussion | Beiträge)
KKeine Bearbeitungszusammenfassung
Zeile 47: Zeile 47:
});
});


importScript('Vorlage:Mentorenliste');
addOnloadHook(function()
{
  if (wgPageName != "Kategorie:Stargate_Kommando_SG-1_Wichtige_Episode") return;
  $("div#mw-pages h3").html(function(i, text)
  {
    return (text == "@")?"10":text;
  });
});

Version vom 21. Juli 2010, 19:01 Uhr

revisionCounter.checkOnlyOnHistory = false;

addOnloadHook(function()
{
  if(document.getElementById('toc'))
  {
    var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
    var toggleLink = document.getElementById('togglelink');
    if ($("span.showtoc").size()>0)
    {
      if(toc.style.display != 'block')
      {
        changeText(toggleLink, tocHideText);
        toc.style.display = 'block';
      }
    }
    else if ($("span.hidetoc").size()>0)
    {
      if(toc.style.display != 'none')
      {
        changeText(toggleLink, tocShowText);
        toc.style.display = 'none';
      }
    }
  }
});

addOnloadHook(function()
{
  $("select[name='Auswahl']").each(function(i)
  {
    this.onchange = function()
    {
      if (this.options[this.options.selectedIndex].value == '%7B%7Bsubst%3AIP-Signaturnachtrag%7C%2B%7C%7C%7D%7D%2B')
        $.get('http://www.stargate-wiki.de/w/api.php?action=query&format=json&titles='+encodeURIComponent(wgPageName)+'&prop=revisions&meta=siteinfo|allmessages&ammessages=jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec',
    function(data)
    {
      var zeit =
        new Date(Date.parse(data.query.pages[wgArticleId].revisions[0].timestamp)+data.query.general.timeoffset*60*1000);
      insertTags("{"+"{"+"subst:"+(data.query.pages[wgArticleId].revisions[0].anon===''?"IP-":"")+"Signaturnachtrag|"+data.query.pages[wgArticleId].revisions[0].user+"|"+(zeit.getUTCHours()<10?"0":"")+zeit.getUTCHours()+":"+(zeit.getUTCMinutes()<10?"0":"")+zeit.getUTCMinutes()+", "+zeit.getUTCDate()+". "+data.query.allmessages[zeit.getUTCMonth()]["*"]+" "+zeit.getUTCFullYear()+" (CE"+(data.query.general.timeoffset==120?"S":"")+"T)|"+wgUserName+"}"+"}", '', '');
    }, 'json');
      else
        insertTags(unescape(this.options[this.options.selectedIndex].value).split('+')[0],unescape(this.options[this.options.selectedIndex].value).split('+')[1],unescape(this.options[this.options.selectedIndex].value).split('+')[2]);
      this.options.selectedIndex=0;
    };
  });
});

addOnloadHook(function()
{
  if (wgPageName != "Kategorie:Stargate_Kommando_SG-1_Wichtige_Episode") return;
  $("div#mw-pages h3").html(function(i, text)
  {
    return (text == "@")?"10":text;
  });
});