Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
// stockphoto_prevent=true;mw.loader.load("//de.wikipedia.org/w/index.php?title=User:lustiger_seth/unsigned.js&action=raw&ctype=text/javascript&dontcountme=s");// Versionsvergleich zwischen mehreren Versionen auflösen$(function(){varmultidiff=document.getElementsByClassName("diff-multi")[0];if(!multidiff)return;varleftlink=document.getElementById("mw-diff-otitle1").getElementsByTagName("a")[0].href;varleft=document.createElement("a");left.href=leftlink+"&diff=next";left.appendChild(document.createTextNode("→"));multidiff.insertBefore(left,multidiff.firstChild);varrightlink=document.getElementById("mw-diff-ntitle1").getElementsByTagName("a")[0].href;varright=document.createElement("a");right.href=rightlink+"&diff=prev";right.appendChild(document.createTextNode("←"));multidiff.appendChild(right);});$('#editform').find('input[type="text"]').keypress(function(event){if(event.keyCode==13){event.preventDefault();}});/** * historyCombine: * * fasst in der Versionsgeschichte Einträge zusammen, wenn sie * aufeinanderfolgend vom gleichen Author stammen. * Sinnvoll ist (m)eine angepasste common.css * * merges sequenced edits from the same author in * the history list * A modified common.css is recommened (like mine) * * * Author: Benutzer:Nightfly85 */$(document).ready(function(){// determines how many sequenced edits are required to stack themvarminStackCount=3;if(mw.config.get('wgAction')!="history"||minStackCount<2)return;// nothing to do here...// cache the history list and its countvar$listItems=$('ul#pagehistory').find('li');varlistItemsLength=$listItems.length-1;// prepare the iterator compare elementsvarcurrentAuthorName='',lastAuthorName='';var$lastRow,$rootRow;// this array contains grouped elements and will be// resetted when a new author name is foundvarstack=[];// combine countervarcombinedStacks=0;// start the loop, iterate every row$listItems.each(function(index,rowEl){// cache the current row (don't know if this is necessary :)var$row=$(rowEl);// cache the found author namecurrentAuthorName=$row.find('.history-user a.mw-userlink').text();if(currentAuthorName===lastAuthorName){// Yes, this author does more than one sequenced entryif(stack.length===0){// stack is empty, so the last row was the first item of the stack$rootRow=$lastRow;}stack.push($row);}if(currentAuthorName!==lastAuthorName||index===listItemsLength){// a new author was found or this is the last iterationvarstacklength=stack.length;if((stacklength+1)>=minStackCount){// there is a stack we have to translate firstvarctText=(stacklength>=1)?stacklength.toString()+' weitere Beiträge':'einen weiteren Beitrag';$rootRow.addClass('mw-historycombine-rootRow mw-historycombine-rootRow-folded').append(' <a href="#" class="mw-historycombine-autoBundleInfo"><span class="mw-historycombine-foldaction">zeige</span> '+ctText+' von '+mw.html.escape(lastAuthorName));for(vari=0;i<stacklength;++i){// hide the stack items// stack[i] = jQuery objectstack[i].addClass('mw-historycombine-hiddenChild mw-historycombine-hiddenChildIndex-'+$rootRow.index()).fadeOut();}++combinedStacks;}// reset the stackstack=[];// Save this author name for the next iterationlastAuthorName=currentAuthorName;$lastRow=$(rowEl);}});if(combinedStacks){// If combined stacks exists, generate anchors to expand/collapse all$('.mw-historycombine-unfoldAll').click(function(e){e.preventDefault();$('.mw-historycombine-rootRow-folded').each(function(i,el){toggleStackVisibility($(el));});});$('.mw-historycombine-unfoldAll').click(function(e){e.preventDefault();$('.mw-historycombine-rootRow-unfolded').each(function(i,el){toggleStackVisibility($(el));});});$('input.historysubmit').parent().append('Zusammengefasste Beiträge: <a href="#" class="mw-historycombine-unfoldAll">ausklappen</a> | <a href="#" class="mw-historycombine-foldAll">zuklappen</a>');}$('a.mw-historycombine-autoBundleInfo').click(function(e){e.preventDefault();toggleStackVisibility($(this).closest('li'));});functiontoggleStackVisibility($row){// first, adjust the text from clicked link...var$foldAction=$row.find('span.mw-historycombine-foldaction');$foldAction.text($foldAction.text()=='zeige'?'verstecke':'zeige');// ...and second, look for linked stack items to expand or collapse them$row.toggleClass('mw-historycombine-rootRow-folded').toggleClass('mw-historycombine-rootRow-unfolded').parent().find('.mw-historycombine-hiddenChildIndex-'+$row.index()).slideToggle('fast');}});// eigene Beiträge nur geänderteif(wgCanonicalSpecialPageName=="Contributions")addOnloadHook(function(){varmonthsel=document.getElementById('month');if(!monthsel)return;varcontent=document.getElementById('bodyContent')||document.getElementById('mw_contentholder')||document.getElementById('article');varlist=content.getElementsByTagName('ul');if(list.length===0)return;list=list[list.length-1];// Last one should (hopefully) be the contribs list in most casesvarspan=document.createElement('span');span.style.marginLeft='1em';span.appendChild(document.createTextNode('Doppeleinträge ausblenden'));varcbdupl=document.createElement('input');cbdupl.type='checkbox';span.appendChild(cbdupl);span.appendChild(document.createTextNode('aktuelle Beiträge ausblenden'));varcbtop=document.createElement('input');cbtop.type='checkbox';span.appendChild(cbtop);functionrefreshContribs(){varli=list.getElementsByTagName('li');vartitles={};for(vari=0;i<li.length;i++){varlink=li[i].getElementsByTagName('a')[1];varstrong=getElementsByClassName(li[i],'span','mw-uctop');if((titles[link.title]&&cbdupl.checked)||(strong.length&&cbtop.checked))li[i].style.display='none';elseli[i].style.display='list-item';titles[link.title]=true;}}cbdupl.onclick=refreshContribs;cbtop.onclick=refreshContribs;monthsel.parentNode.parentNode.appendChild(span);});// eigene Beiträge nur geänderteif(wgCanonicalSpecialPageName=="Contributions")addOnloadHook(function(){varmonthsel=document.getElementById('month');if(!monthsel)return;varcontent=document.getElementById('bodyContent')||document.getElementById('mw_contentholder')||document.getElementById('article')varlist=content.getElementsByTagName('ul');if(list.length==0)return;list=list[list.length-1];// Last one should (hopefully) be the contribs list in most casesvarspan=document.createElement('span');span.style.marginLeft='1em';span.appendChild(document.createTextNode('Doppeleinträge ausblenden'));varcbdupl=document.createElement('input');cbdupl.type='checkbox';span.appendChild(cbdupl);span.appendChild(document.createTextNode('aktuelle Beiträge ausblenden'));varcbtop=document.createElement('input');cbtop.type='checkbox';span.appendChild(cbtop);functionrefreshContribs(){varli=list.getElementsByTagName('li');vartitles={};for(vari=0;i<li.length;i++){varlink=li[i].getElementsByTagName('a')[1];varstrong=getElementsByClassName(li[i],'span','mw-uctop');if((titles[link.title]&&cbdupl.checked)||(strong.length&&cbtop.checked))li[i].style.display='none';elseli[i].style.display='list-item';titles[link.title]=true;}}cbdupl.onclick=refreshContribs;cbtop.onclick=refreshContribs;monthsel.parentNode.parentNode.appendChild(span);});