<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://werwolf-online.com/wiki/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ASpieleraktivitaet.js</id>
	<title>MediaWiki:Spieleraktivitaet.js - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://werwolf-online.com/wiki/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3ASpieleraktivitaet.js"/>
	<link rel="alternate" type="text/html" href="https://werwolf-online.com/wiki/index.php?title=MediaWiki:Spieleraktivitaet.js&amp;action=history"/>
	<updated>2026-05-01T14:59:17Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Werwolf Online</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://werwolf-online.com/wiki/index.php?title=MediaWiki:Spieleraktivitaet.js&amp;diff=1057&amp;oldid=prev</id>
		<title>Xaver am 25. November 2019 um 17:18 Uhr</title>
		<link rel="alternate" type="text/html" href="https://werwolf-online.com/wiki/index.php?title=MediaWiki:Spieleraktivitaet.js&amp;diff=1057&amp;oldid=prev"/>
		<updated>2019-11-25T17:18:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 25. November 2019, 17:18 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/*! @license Copyright 2019 Xaver MIT-licensed &lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http:&lt;/del&gt;//&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;opensource&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;org/licenses/MIT) */&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$.when($.getScript&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;wiki&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;index&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;php?title=MediaWiki:Dygraph.min&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js&amp;amp;action=raw&amp;amp;ctype=text/javascript&amp;#039;)&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$.getScript(&amp;#039;/wiki/index.php?title=MediaWiki&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Spieleraktivitaet_data.js&amp;amp;action=raw&amp;amp;ctype&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;text/javascript&amp;#039;))&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;then(function(){xCreateGraphs&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;);document&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;getElementById&lt;/ins&gt;(&amp;#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;loadCustomJS&amp;#039;)&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;innerHTML&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&amp;#039;;},function(e){document&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;getElementById(&amp;#039;loadCustomJS&lt;/ins&gt;&amp;#039;).&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;innerHTML=&lt;/ins&gt;&amp;#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Fehler beim Laden eines Scripts:&amp;lt;br&amp;gt;&amp;#039;+e&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;message;mw&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;log.error(e.message&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;}&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;&lt;/ins&gt;function &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xCreateGraphs&lt;/ins&gt;(){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const anonymeSpiele=[34,53,97,178,188,197,245].map(&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;x&lt;/ins&gt;)=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt;&amp;#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;alt-&lt;/ins&gt;&amp;#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;+x&lt;/ins&gt;);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const partnerSpiele=[41,92&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;176].map(&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;x&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&amp;gt;&lt;/ins&gt;&amp;#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;alt-&lt;/ins&gt;&amp;#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;+x&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;const userData=xData&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;users;const gamesData&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xData.games;const rollenData=xData&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;rollen&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const sortedGames=Object&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;values(gamesData)&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sort&lt;/ins&gt;((&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a,b&lt;/ins&gt;)=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;a.date&amp;lt;b.date?-1:(a.date&amp;gt;b&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date?1:0)&lt;/ins&gt;);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;let csvActivity&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;Datum&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;alle Spieler&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aktive Spieler,sehr aktive Spieler,neue Spieler\n&lt;/ins&gt;&amp;#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;let csvAnzahl=&amp;#039;Datum,Nur 1 Spiel,Testphase,Eingespielt,Gut dabei,Pure Sucht\n&lt;/ins&gt;&amp;#039;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const all&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;new Map()&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const all25gamesAgo&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;new Set()&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const aktive&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;new Map()&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const gameCountPerPlayerPerGame&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;new Map&lt;/ins&gt;()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;const filteredGames=sortedGames&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;filter&lt;/ins&gt;((&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;game&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&amp;gt;anonymeSpiele&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;indexOf(game&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gamenumber)===&lt;/ins&gt;-1);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;filteredGames.forEach(function(game&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;i){Object.keys(game.players).forEach(function(playerId){mapValueIncrease(all,playerId&lt;/ins&gt;,1&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;);mapValueIncrease(aktive&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;playerId&lt;/ins&gt;,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1)&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const gameCountOfPlayer&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gameCountPerPlayerPerGame.get&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;playerId&lt;/ins&gt;);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if(gameCountOfPlayer=&lt;/ins&gt;==&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;undefined&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{&lt;/ins&gt;gameCountPerPlayerPerGame&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.set&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;playerId,&lt;/ins&gt;{&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/ins&gt;game.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date]:1,total:1}&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;}else{gameCountOfPlayer.total+&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1;gameCountOfPlayer[game.date]&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gameCountOfPlayer.total&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/ins&gt;});&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if&lt;/ins&gt;(i&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;=25&lt;/ins&gt;){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;prevGame=gamesData[filteredGames[i-25].id];&lt;/ins&gt;Object.keys(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;prevGame&lt;/ins&gt;.players).forEach(function(playerId){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;all25gamesAgo.add&lt;/ins&gt;(playerId);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const count=&lt;/ins&gt;aktive.get(playerId);if(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;count&amp;gt;1&lt;/ins&gt;){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aktive&lt;/ins&gt;.set(playerId,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;count-&lt;/ins&gt;1);}else{&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aktive&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;delete(playerId)&lt;/ins&gt;;}});&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;function _defineProperty(obj,key,value){if(key in obj){Object&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;defineProperty(obj,key&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{value&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;value,enumerable:true,configurable:true,writable:true});}else{obj[key]&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;value;}return obj;}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;let sum1=0,sum2=0,sum3&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0;aktive.forEach(function(v,k&lt;/ins&gt;){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum1+&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if&lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v&amp;gt;=5&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{sum2+&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;;if(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;v&lt;/ins&gt;&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=10&lt;/ins&gt;){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum3+=&lt;/ins&gt;1;}}});&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;let eins&lt;/ins&gt;=0,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;testphase=0,eingespielt=0,gutDabei&lt;/ins&gt;=0,&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pureSucht&lt;/ins&gt;=0;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;all&lt;/ins&gt;.forEach(function(v,k){if(v&amp;gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;50&lt;/ins&gt;){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pureSucht&lt;/ins&gt;+=1;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}else &lt;/ins&gt;if(v&amp;gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;25&lt;/ins&gt;){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gutDabei&lt;/ins&gt;+=1;}&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;else if(v&amp;gt;=10&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{&lt;/ins&gt;eingespielt&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;+&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1;}else &lt;/ins&gt;if(v&amp;gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2&lt;/ins&gt;){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;testphase&lt;/ins&gt;+=1;}else{&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eins&lt;/ins&gt;+=1;}&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;csvActivity&lt;/ins&gt;+=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;game.date+&amp;#039;,&amp;#039;&lt;/ins&gt;+&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum1&lt;/ins&gt;+&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&lt;/ins&gt;,&amp;#039;+sum2+&amp;#039;,&amp;#039;+sum3+&amp;#039;,&amp;#039;+(all.size-all25gamesAgo.size)+&amp;#039;\n&amp;#039;;csvAnzahl+=game.date+&amp;#039;,&amp;#039;+eins+&amp;#039;,&amp;#039;+testphase+&amp;#039;,&amp;#039;+eingespielt+&amp;#039;,&amp;#039;+gutDabei+&amp;#039;,&amp;#039;+pureSucht+&amp;#039;\n&amp;#039;;});new Dygraph(document.getElementById(&amp;#039;graphdiv1PlayerActivity&amp;#039;),csvActivity,{legend:&amp;#039;always&amp;#039;,width:700});new Dygraph(document.getElementById(&amp;#039;graphdiv2PlayerActivity&amp;#039;),csvAnzahl,{legend:&amp;#039;always&amp;#039;,width&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:700});const dygraphData=[&amp;#039;Datum&amp;#039;].concat(filteredGames.map((game)=&amp;gt;&lt;/ins&gt;game.date));gameCountPerPlayerPerGame.forEach(function(value,key){if(value.total&amp;gt;=10){dygraphData[0]+=&amp;#039;,&amp;#039;+userData[key].name;filteredGames.forEach(function(game,i){dygraphData[i+1]+=&amp;#039;,&amp;#039;+(value.hasOwnProperty(game.date)?value[game.date]:&amp;#039;&amp;#039;);});}});createCustomDygraph(&amp;#039;dygraphContainer&amp;#039;,dygraphData.join(&amp;#039;\n&amp;#039;));function mapValueIncrease(map,key,increaseValue){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;value=map.get(key);if(value!==undefined){map.set(key,value+increaseValue);}else{map.set(key,increaseValue);}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;when&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;getScript&lt;/del&gt;(&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/wiki/index&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;php?title&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MediaWiki:Dygraph&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;min.js&amp;amp;action=raw&amp;amp;ctype=text/javascript&lt;/del&gt;&amp;#039;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,$&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;getScript(&lt;/del&gt;&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/wiki/index&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;php?title=MediaWiki:Spieleraktivitaet_data&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;js&amp;amp;action=raw&amp;amp;ctype=text/javascript&amp;#039;&lt;/del&gt;))&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.then(&lt;/del&gt;function(){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;document.getElementById&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;loadCustomJS&amp;#039;&lt;/del&gt;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.innerHTML&lt;/del&gt;=&amp;#039;&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;xCreateGraphs(&lt;/del&gt;);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;function&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;e&lt;/del&gt;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{document.getElementById(&lt;/del&gt;&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;loadCustomJS&lt;/del&gt;&amp;#039;).&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;innerHTML&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;Fehler beim Laden eines Scripts:&amp;lt;br&amp;gt;&amp;#039;+e&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;message&lt;/del&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mw&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;log&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;error&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;e.message);});function xCreateGraphs&lt;/del&gt;()&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{var anonymeSpiele&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[34,53,97,178,188,197,245]&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;map(function(x){return&amp;#039;alt-&amp;#039;+x;}&lt;/del&gt;);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var partnerSpiele&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[41&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;92&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;176].map(function(x){return&lt;/del&gt;&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;alt-&lt;/del&gt;&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;+x;})&lt;/del&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var userData&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xData.users&lt;/del&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var gamesData&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xData.games&lt;/del&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var rollenData&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xData.rollen&lt;/del&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var sortedGames&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Object.values&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gamesData&lt;/del&gt;).&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sort&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;function&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a,b&lt;/del&gt;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{return a&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date&amp;lt;b&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date?&lt;/del&gt;-1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:a.date&amp;gt;b.date?1:0;}&lt;/del&gt;);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var csvActivity=&amp;#039;Datum&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;alle Spieler,aktive Spieler,sehr aktive Spieler,neue Spieler\n&amp;#039;;var csvAnzahl=&amp;#039;Datum&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Nur &lt;/del&gt;1 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Spiel&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Testphase&lt;/del&gt;,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Eingespielt,Gut dabei,Pure Sucht\n&amp;#039;&lt;/del&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var all&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;new Map&lt;/del&gt;();&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var all25gamesAgo&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;new Set();var aktive&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;new Map(&lt;/del&gt;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;var &lt;/del&gt;gameCountPerPlayerPerGame&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=new Map&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;);var filteredGames=sortedGames.filter(function(game)&lt;/del&gt;{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;return anonymeSpiele.indexOf(&lt;/del&gt;game.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gamenumber&lt;/del&gt;)==&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=-1&lt;/del&gt;;});&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;filteredGames.forEach&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;function(game,&lt;/del&gt;i){Object.keys(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;game&lt;/del&gt;.players).forEach(function(playerId){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mapValueIncrease&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;all,&lt;/del&gt;playerId&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,1&lt;/del&gt;);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mapValueIncrease(&lt;/del&gt;aktive&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,playerId,1);var gameCountOfPlayer=gameCountPerPlayerPerGame&lt;/del&gt;.get(playerId);if(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gameCountOfPlayer===undefined&lt;/del&gt;){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var _gameCountPerPlayerPe;gameCountPerPlayerPerGame&lt;/del&gt;.set(playerId,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(_gameCountPerPlayerPe={},_defineProperty(_gameCountPerPlayerPe,game.date,&lt;/del&gt;1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;),_defineProperty(_gameCountPerPlayerPe,&amp;quot;total&amp;quot;,1),_gameCountPerPlayerPe)&lt;/del&gt;);}else{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gameCountOfPlayer&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;total+=1;gameCountOfPlayer[game.date]=gameCountOfPlayer.total&lt;/del&gt;;}});&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if(i&amp;gt;&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;25&lt;/del&gt;){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;prevGame&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gamesData[filteredGames[i-25].id]&lt;/del&gt;;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Object.keys&lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;prevGame.players&lt;/del&gt;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.forEach(function(playerId){all25gamesAgo.add(playerId);var count&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aktive.get(playerId)&lt;/del&gt;;if(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;count&lt;/del&gt;&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aktive.set(playerId,count-&lt;/del&gt;1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/del&gt;;}&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;else{aktive.delete(playerId);&lt;/del&gt;}});&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function createCustomDygraph(id,data){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;series=[];&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;legend=document.createElement(&amp;#039;div&amp;#039;);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;tooltip=document.createElement(&amp;#039;span&amp;#039;);legend.className=&amp;#039;dygraph-legend-new&amp;#039;;tooltip.className=&amp;#039;dygraph-tooltip&amp;#039;;document.body.appendChild(tooltip);document.getElementById(id).addEventListener(&amp;#039;mouseout&amp;#039;,function(ev){tooltip.style.visibility=&amp;#039;hidden&amp;#039;;});g=new Dygraph(id,data,{legend:&amp;#039;always&amp;#039;,width:600,connectSeparatedPoints:true,highlightSeriesOpts:{strokeWidth:3,strokeBorderWidth:1,highlightCircleSize:5},legendFormatter:legendFormatter,highlightCallback:highlightCallback,clickCallback:clickCallback});&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;oldLegend=document.getElementById(id).getElementsByClassName(&amp;#039;dygraph-legend&amp;#039;)[0];oldLegend.parentNode.insertBefore(legend,oldLegend.nextSibling);function highlightCallback(ev,x,points,row,seriesName){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;index=g.indexFromSetName(seriesName);&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;serie=series[index-1].serie;tooltip.innerHTML=new Date(x).toLocaleDateString()+&amp;#039; &amp;#039;+serie.dashHTML+seriesName+&amp;#039;: &amp;#039;+g.getValue(row,index);tooltip.style.left=ev.pageX+15+&amp;#039;px&amp;#039;;tooltip.style.top=ev.pageY-15+&amp;#039;px&amp;#039;;tooltip.style.visibility=&amp;#039;visible&amp;#039;;tooltip.style.borderColor=serie.color;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var sum1&lt;/del&gt;=0,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum2&lt;/del&gt;=0,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum3&lt;/del&gt;=0;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aktive&lt;/del&gt;.forEach(function(v,k){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum1+=1;&lt;/del&gt;if(v&amp;gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;5&lt;/del&gt;){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum2&lt;/del&gt;+=1;if(v&amp;gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;10&lt;/del&gt;){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sum3&lt;/del&gt;+=1;}&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/del&gt;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;var eins=0,testphase=0,&lt;/del&gt;eingespielt=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0,gutDabei=0,pureSucht=0;all.forEach(function(v,k){&lt;/del&gt;if(v&amp;gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;50&lt;/del&gt;){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pureSucht&lt;/del&gt;+=1;}else &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if(v&amp;gt;=25)&lt;/del&gt;{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;gutDabei&lt;/del&gt;+=1;}&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;else if(v&amp;gt;=10&lt;/del&gt;)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{eingespielt&lt;/del&gt;+=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1;}else if(v&amp;gt;=2){testphase&lt;/del&gt;+&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=1;}else{eins&lt;/del&gt;+&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=1;}});csvActivity+=game.date+&amp;#039;,&amp;#039;+sum1+&amp;#039;&lt;/del&gt;,&amp;#039;+sum2+&amp;#039;,&amp;#039;+sum3+&amp;#039;,&amp;#039;+(all.size-all25gamesAgo.size)+&amp;#039;\n&amp;#039;;csvAnzahl+=game.date+&amp;#039;,&amp;#039;+eins+&amp;#039;,&amp;#039;+testphase+&amp;#039;,&amp;#039;+eingespielt+&amp;#039;,&amp;#039;+gutDabei+&amp;#039;,&amp;#039;+pureSucht+&amp;#039;\n&amp;#039;;});new Dygraph(document.getElementById(&amp;#039;graphdiv1PlayerActivity&amp;#039;),csvActivity,{legend:&amp;#039;always&amp;#039;,width:700});new Dygraph(document.getElementById(&amp;#039;graphdiv2PlayerActivity&amp;#039;),csvAnzahl,{legend:&amp;#039;always&amp;#039;,width&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:700});var dygraphData=[&amp;#039;Datum&amp;#039;].concat(filteredGames.map(function(game){return &lt;/del&gt;game.date&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;}&lt;/del&gt;));gameCountPerPlayerPerGame.forEach(function(value,key){if(value.total&amp;gt;=10){dygraphData[0]+=&amp;#039;,&amp;#039;+userData[key].name;filteredGames.forEach(function(game,i){dygraphData[i+1]+=&amp;#039;,&amp;#039;+(value.hasOwnProperty(game.date)?value[game.date]:&amp;#039;&amp;#039;);});}});createCustomDygraph(&amp;#039;dygraphContainer&amp;#039;,dygraphData.join(&amp;#039;\n&amp;#039;));function mapValueIncrease(map,key,increaseValue){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;value=map.get(key);if(value!==undefined){map.set(key,value+increaseValue);}else{map.set(key,increaseValue);}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function legendFormatter(data){if(data.x===undefined){if(legend.innerHTML.length===0){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;docFrag=document.createDocumentFragment();data.series.forEach(function(serie,i){&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;const &lt;/ins&gt;el=document.createElement(&amp;#039;div&amp;#039;);el.innerHTML=serie.dashHTML+&amp;#039; &amp;#039;+serie.labelHTML;el.style.color=serie.color;el.className=&amp;#039;dygraph-legend-element&amp;#039;;el.addEventListener(&amp;#039;click&amp;#039;,function(ev){series[i].visible=!series[i].visible;g.setVisibility(i,series[i].visible);el.style.opacity=series[i].visible?1:0.6;});el.addEventListener(&amp;#039;dblclick&amp;#039;,function(ev){g.setVisibility(series.map(function(serie,j){serie.visible=i===j;serie.el.style.opacity=serie.visible?1:0.6;return serie.visible;}));});el.addEventListener(&amp;#039;mouseover&amp;#039;,function(ev){if(g.visibility()[i]){g.setSelection(0,serie.label,false);}});docFrag.appendChild(el);series.push({serie:serie,el:el,visible:true});});legend.appendChild(docFrag);}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function createCustomDygraph(id,data){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;series=[];&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;legend=document.createElement(&amp;#039;div&amp;#039;);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;tooltip=document.createElement(&amp;#039;span&amp;#039;);legend.className=&amp;#039;dygraph-legend-new&amp;#039;;tooltip.className=&amp;#039;dygraph-tooltip&amp;#039;;document.body.appendChild(tooltip);document.getElementById(id).addEventListener(&amp;#039;mouseout&amp;#039;,function(ev){tooltip.style.visibility=&amp;#039;hidden&amp;#039;;});g=new Dygraph(id,data,{legend:&amp;#039;always&amp;#039;,width:600,connectSeparatedPoints:true,highlightSeriesOpts:{strokeWidth:3,strokeBorderWidth:1,highlightCircleSize:5},legendFormatter:legendFormatter,highlightCallback:highlightCallback,clickCallback:clickCallback});&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;oldLegend=document.getElementById(id).getElementsByClassName(&amp;#039;dygraph-legend&amp;#039;)[0];oldLegend.parentNode.insertBefore(legend,oldLegend.nextSibling);function highlightCallback(ev,x,points,row,seriesName){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;index=g.indexFromSetName(seriesName);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;serie=series[index-1].serie;tooltip.innerHTML=new Date(x).toLocaleDateString()+&amp;#039; &amp;#039;+serie.dashHTML+seriesName+&amp;#039;: &amp;#039;+g.getValue(row,index);tooltip.style.left=ev.pageX+15+&amp;#039;px&amp;#039;;tooltip.style.top=ev.pageY-15+&amp;#039;px&amp;#039;;tooltip.style.visibility=&amp;#039;visible&amp;#039;;tooltip.style.borderColor=serie.color;}&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function legendFormatter(data){if(data.x===undefined){if(legend.innerHTML.length===0){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;docFrag=document.createDocumentFragment();data.series.forEach(function(serie,i){&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var &lt;/del&gt;el=document.createElement(&amp;#039;div&amp;#039;);el.innerHTML=serie.dashHTML+&amp;#039; &amp;#039;+serie.labelHTML;el.style.color=serie.color;el.className=&amp;#039;dygraph-legend-element&amp;#039;;el.addEventListener(&amp;#039;click&amp;#039;,function(ev){series[i].visible=!series[i].visible;g.setVisibility(i,series[i].visible);el.style.opacity=series[i].visible?1:0.6;});el.addEventListener(&amp;#039;dblclick&amp;#039;,function(ev){g.setVisibility(series.map(function(serie,j){serie.visible=i===j;serie.el.style.opacity=serie.visible?1:0.6;return serie.visible;}));});el.addEventListener(&amp;#039;mouseover&amp;#039;,function(ev){if(g.visibility()[i]){g.setSelection(0,serie.label,false);}});docFrag.appendChild(el);series.push({serie:serie,el:el,visible:true});});legend.appendChild(docFrag);}}&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;return&amp;#039;0&amp;#039;;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;return&amp;#039;0&amp;#039;;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function clickCallback(ev){if(g.isSeriesLocked()){g.clearSelection();}else{g.setSelection(g.getSelection(),g.getHighlightSeries(),true);}}}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;function clickCallback(ev){if(g.isSeriesLocked()){g.clearSelection();}else{g.setSelection(g.getSelection(),g.getHighlightSeries(),true);}}}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Xaver</name></author>
	</entry>
	<entry>
		<id>https://werwolf-online.com/wiki/index.php?title=MediaWiki:Spieleraktivitaet.js&amp;diff=1051&amp;oldid=prev</id>
		<title>Xaver: Die Seite wurde neu angelegt: „/*! @license Copyright 2019 Xaver MIT-licensed (http://opensource.org/licenses/MIT) */ function _defineProperty(obj,key,value){if(key in obj){Object.defineProp…“</title>
		<link rel="alternate" type="text/html" href="https://werwolf-online.com/wiki/index.php?title=MediaWiki:Spieleraktivitaet.js&amp;diff=1051&amp;oldid=prev"/>
		<updated>2019-11-18T23:00:37Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;! @license Copyright 2019 Xaver MIT-licensed (http://opensource.org/licenses/MIT): &lt;/span&gt; function _defineProperty(obj,key,value){if(key in obj){Object.defineProp…“&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/*! @license Copyright 2019 Xaver MIT-licensed (http://opensource.org/licenses/MIT) */&lt;br /&gt;
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}&lt;br /&gt;
$.when($.getScript(&amp;#039;/wiki/index.php?title=MediaWiki:Dygraph.min.js&amp;amp;action=raw&amp;amp;ctype=text/javascript&amp;#039;),$.getScript(&amp;#039;/wiki/index.php?title=MediaWiki:Spieleraktivitaet_data.js&amp;amp;action=raw&amp;amp;ctype=text/javascript&amp;#039;)).then(function(){document.getElementById(&amp;#039;loadCustomJS&amp;#039;).innerHTML=&amp;#039;&amp;#039;;xCreateGraphs();},function(e){document.getElementById(&amp;#039;loadCustomJS&amp;#039;).innerHTML=&amp;#039;Fehler beim Laden eines Scripts:&amp;lt;br&amp;gt;&amp;#039;+e.message;mw.log.error(e.message);});function xCreateGraphs(){var anonymeSpiele=[34,53,97,178,188,197,245].map(function(x){return&amp;#039;alt-&amp;#039;+x;});var partnerSpiele=[41,92,176].map(function(x){return&amp;#039;alt-&amp;#039;+x;});var userData=xData.users;var gamesData=xData.games;var rollenData=xData.rollen;var sortedGames=Object.values(gamesData).sort(function(a,b){return a.date&amp;lt;b.date?-1:a.date&amp;gt;b.date?1:0;});var csvActivity=&amp;#039;Datum,alle Spieler,aktive Spieler,sehr aktive Spieler,neue Spieler\n&amp;#039;;var csvAnzahl=&amp;#039;Datum,Nur 1 Spiel,Testphase,Eingespielt,Gut dabei,Pure Sucht\n&amp;#039;;var all=new Map();var all25gamesAgo=new Set();var aktive=new Map();var gameCountPerPlayerPerGame=new Map();var filteredGames=sortedGames.filter(function(game){return anonymeSpiele.indexOf(game.gamenumber)===-1;});filteredGames.forEach(function(game,i){Object.keys(game.players).forEach(function(playerId){mapValueIncrease(all,playerId,1);mapValueIncrease(aktive,playerId,1);var gameCountOfPlayer=gameCountPerPlayerPerGame.get(playerId);if(gameCountOfPlayer===undefined){var _gameCountPerPlayerPe;gameCountPerPlayerPerGame.set(playerId,(_gameCountPerPlayerPe={},_defineProperty(_gameCountPerPlayerPe,game.date,1),_defineProperty(_gameCountPerPlayerPe,&amp;quot;total&amp;quot;,1),_gameCountPerPlayerPe));}else{gameCountOfPlayer.total+=1;gameCountOfPlayer[game.date]=gameCountOfPlayer.total;}});if(i&amp;gt;=25){prevGame=gamesData[filteredGames[i-25].id];Object.keys(prevGame.players).forEach(function(playerId){all25gamesAgo.add(playerId);var count=aktive.get(playerId);if(count&amp;gt;1){aktive.set(playerId,count-1);}else{aktive.delete(playerId);}});}&lt;br /&gt;
var sum1=0,sum2=0,sum3=0;aktive.forEach(function(v,k){sum1+=1;if(v&amp;gt;=5){sum2+=1;if(v&amp;gt;=10){sum3+=1;}}});var eins=0,testphase=0,eingespielt=0,gutDabei=0,pureSucht=0;all.forEach(function(v,k){if(v&amp;gt;=50){pureSucht+=1;}else if(v&amp;gt;=25){gutDabei+=1;}else if(v&amp;gt;=10){eingespielt+=1;}else if(v&amp;gt;=2){testphase+=1;}else{eins+=1;}});csvActivity+=game.date+&amp;#039;,&amp;#039;+sum1+&amp;#039;,&amp;#039;+sum2+&amp;#039;,&amp;#039;+sum3+&amp;#039;,&amp;#039;+(all.size-all25gamesAgo.size)+&amp;#039;\n&amp;#039;;csvAnzahl+=game.date+&amp;#039;,&amp;#039;+eins+&amp;#039;,&amp;#039;+testphase+&amp;#039;,&amp;#039;+eingespielt+&amp;#039;,&amp;#039;+gutDabei+&amp;#039;,&amp;#039;+pureSucht+&amp;#039;\n&amp;#039;;});new Dygraph(document.getElementById(&amp;#039;graphdiv1PlayerActivity&amp;#039;),csvActivity,{legend:&amp;#039;always&amp;#039;,width:700});new Dygraph(document.getElementById(&amp;#039;graphdiv2PlayerActivity&amp;#039;),csvAnzahl,{legend:&amp;#039;always&amp;#039;,width:700});var dygraphData=[&amp;#039;Datum&amp;#039;].concat(filteredGames.map(function(game){return game.date;}));gameCountPerPlayerPerGame.forEach(function(value,key){if(value.total&amp;gt;=10){dygraphData[0]+=&amp;#039;,&amp;#039;+userData[key].name;filteredGames.forEach(function(game,i){dygraphData[i+1]+=&amp;#039;,&amp;#039;+(value.hasOwnProperty(game.date)?value[game.date]:&amp;#039;&amp;#039;);});}});createCustomDygraph(&amp;#039;dygraphContainer&amp;#039;,dygraphData.join(&amp;#039;\n&amp;#039;));function mapValueIncrease(map,key,increaseValue){var value=map.get(key);if(value!==undefined){map.set(key,value+increaseValue);}else{map.set(key,increaseValue);}}&lt;br /&gt;
function createCustomDygraph(id,data){var series=[];var legend=document.createElement(&amp;#039;div&amp;#039;);var tooltip=document.createElement(&amp;#039;span&amp;#039;);legend.className=&amp;#039;dygraph-legend-new&amp;#039;;tooltip.className=&amp;#039;dygraph-tooltip&amp;#039;;document.body.appendChild(tooltip);document.getElementById(id).addEventListener(&amp;#039;mouseout&amp;#039;,function(ev){tooltip.style.visibility=&amp;#039;hidden&amp;#039;;});g=new Dygraph(id,data,{legend:&amp;#039;always&amp;#039;,width:600,connectSeparatedPoints:true,highlightSeriesOpts:{strokeWidth:3,strokeBorderWidth:1,highlightCircleSize:5},legendFormatter:legendFormatter,highlightCallback:highlightCallback,clickCallback:clickCallback});var oldLegend=document.getElementById(id).getElementsByClassName(&amp;#039;dygraph-legend&amp;#039;)[0];oldLegend.parentNode.insertBefore(legend,oldLegend.nextSibling);function highlightCallback(ev,x,points,row,seriesName){var index=g.indexFromSetName(seriesName);var serie=series[index-1].serie;tooltip.innerHTML=new Date(x).toLocaleDateString()+&amp;#039; &amp;#039;+serie.dashHTML+seriesName+&amp;#039;: &amp;#039;+g.getValue(row,index);tooltip.style.left=ev.pageX+15+&amp;#039;px&amp;#039;;tooltip.style.top=ev.pageY-15+&amp;#039;px&amp;#039;;tooltip.style.visibility=&amp;#039;visible&amp;#039;;tooltip.style.borderColor=serie.color;}&lt;br /&gt;
function legendFormatter(data){if(data.x===undefined){if(legend.innerHTML.length===0){var docFrag=document.createDocumentFragment();data.series.forEach(function(serie,i){var el=document.createElement(&amp;#039;div&amp;#039;);el.innerHTML=serie.dashHTML+&amp;#039; &amp;#039;+serie.labelHTML;el.style.color=serie.color;el.className=&amp;#039;dygraph-legend-element&amp;#039;;el.addEventListener(&amp;#039;click&amp;#039;,function(ev){series[i].visible=!series[i].visible;g.setVisibility(i,series[i].visible);el.style.opacity=series[i].visible?1:0.6;});el.addEventListener(&amp;#039;dblclick&amp;#039;,function(ev){g.setVisibility(series.map(function(serie,j){serie.visible=i===j;serie.el.style.opacity=serie.visible?1:0.6;return serie.visible;}));});el.addEventListener(&amp;#039;mouseover&amp;#039;,function(ev){if(g.visibility()[i]){g.setSelection(0,serie.label,false);}});docFrag.appendChild(el);series.push({serie:serie,el:el,visible:true});});legend.appendChild(docFrag);}}&lt;br /&gt;
return&amp;#039;0&amp;#039;;}&lt;br /&gt;
function clickCallback(ev){if(g.isSeriesLocked()){g.clearSelection();}else{g.setSelection(g.getSelection(),g.getHighlightSeries(),true);}}}}&lt;/div&gt;</summary>
		<author><name>Xaver</name></author>
	</entry>
</feed>