/* Gives clean diff URLs Turns this: /w/index.php?title=Main_Page&diff=864711889&oldid=864629150&diffmode=source Into this: /wiki/Special:Diff/864629150/864711889*/(function(){setTimeout(function(){// Timeout to remove "&diffmode=source" which is added latervarurl=newURL(window.location.href)varoldid=url.searchParams.get("oldid")vardiff=url.searchParams.get("diff")varhash=window.location.hash.substr(1)?'#'+window.location.hash.substr(1):''varoutputif(oldid&&!diff){output='Special:Permalink/'+oldid}elseif(oldid&&diff==='prev'){output='Special:Diff/'+oldid}elseif(diff&&oldid){output='Special:Diff/'+oldid+'/'+diff}if(output){window.history.replaceState({},'','/wiki/'+output+hash)}},50)})()