EyeWire Stats - another TamperMonkey script

Yeah, those are a little tricky, because they are refreshed every once in a while.
For the name use this selector:
#overviewCell .mystic-bar [name=status]
And for the button:
#overviewCell .mystic-bar .mysticButton

Not sure however, what do you mean in the second paragraph. Do you want a setting/button near the chat which would make, that if you click in the writing area of the chat, it wouldn’t be shown (as it is now)?

1 Like

yeah i already tried those, but it do nothing with tampermonkey, even with !important (but work within Chrome Elements).

Ok ! I now know why this div was refreshing every 10 seconds in the console :joy:[quote=“KrzysztofKruk, post:141, topic:1218”]
Not sure however, what do you mean in the second paragraph. Do you want a setting/button near the chat which would make, that if you click in the writing area of the chat, it wouldn’t be shown (as it is now)?
[/quote]

No, just don’t think about it, was just a tricky idea, but nothing special.

Anyone having issue with @KrzysztofKruk activity tracker ?

I made this short video to show you my issue : https://mega.nz/#!SAVkyZpC!Q0KNDqpxzLEElFg_Rguyi8zIPSAXpSZJnhRk5O7xgXs

As you can see, it don’t show the good bars, neither the good cubes, percentage is heavy and sometimes replaced by “NaN”. And at a moment % and cubes move to under the bars. Official tracker seem working fine.

I don’t have any issues, but I didn’t play today xD. For what I know, there were some issues recently with incorrectly working EW tracker and SC Log History. So either it was fixed and the fix caused the problem with my Tracker or the problem wasn’t fixed and now it also hit my Tracker xD,
The big numbers are because percentage is probably multiplied by 100 somewhere. Because the number is big, also the bar isn’t shown correctly and the number itself goes to the row below, because it’s to wide for its space.
As for the NaNs, I’m not sure about it. Maybe some division by 0 or something similar. For now, I’ll just wait and see if the problem resolve itself or a fix will be needed.

1 Like

Thanks for explanations, make totally sense :slight_smile:
I already seen this “NaN” in a new sheet dev done about accu, don’t have the link. But in some case “NaN” is used for Unused IDs.
'Will wait and see

i have had some problems with the accuracy bars after the official version was released, mainly getting wrong colours on reap/normal play and trouble with the NaN cubes and some weird accuracy results. If i understand it correct the devs did some corrections in the test acc sheet so cubes with nothing to add and tb get this status instead of 100% (do not get the point since you either trace it correctly and add nothing or if you add merger will you then get low acc % or still NaN)

i have also had a issue with the explanation drop down for weight kind of getting stuck so it hide part of 2d and i have to go to hover over one of the bars to make it go away

1 Like

Sorry for not updating anything for such a long time, but doing additional stats in the profile took much more time, that I was hoping for. To create the stats, I had to set up a server and finding a suitable one (and free, if possible) was quite a challenge. I have tested at least 10 different hostings and each and every one of them had some important limits (like no cron jobs, no cron jobs on a specified time, db limited to 30MB or just being very, very slow). I’ve tried some combined solutions, when one server was doing some part of the job and other was doing something else (e.g. one for cron, one for interaction with users). But only about a week ago I found something, that, as of now, looks great - feedia.co. I didn’t know that hosting before, so I found it almost by accident. I don’t know, what is “wrong” with them, but their free hosting service looks better, than many other premium hostings :slight_smile: Hopefully, it will stay like that forever :slight_smile:

So, I was finally able to do:

ver. 2.0.0

in which I:
FIXED problems with recent changes in Accuracy History (and those NaNs)
FIXED problem, when a bar in the Accuracy History could change its height, but not color
ADDED admin reaps as a separate category in the History
CHANGED bar colors, so now both scythe and reap have their colors the same as in the EW or as in user settings, if somebody’s using @crazyman4865’s script to customize the colors
ADDED additional statistics in the user Profile
CLEANED the code to pass JSHint for ES6 compatibility

Here’s how the new statistics should look like:

As you might see, there are 3 tabs at the top. The first one (current) shows the normal statistics, next one is previous, which shows our results from yesterday, last week and last month. The third tab (best) shows our personal records. CAUTION: those are not all-time bests, just best results since installing the script (well, number of points and number of cubes will be from about when the current version of the script is released), because simply I don’t have access to all time bests and I’m not sure, if I want it, because some might not like me having so much data. xD

In the lower part of the Profile window there are also 3 tabs and a graph.
The graph shows our numbers of points, cubes, trailblazes, scythes and completes. Changing the tabs over the graph changes time range of the graph. The graph shows only data for already ended units of time (e.g. for last 7 days, the newest point in the graph will be yesterday, for last 10 weeks - last week, for last 12 months - last month). The Y axis on the left is common for the number of cubes, trailblazes, scythes/reaps and completed. The one on the right is for points.

Clicking on someone’s profile won’t show the new statistics (although, there might be a short glitch during extended stats will be visible, but those are our own stats, because both our and others’ profile is shown in the same window). The reason for that is, because I didn’t want to allow anybody to stalk anyone else xD

Here’s how the data collecting works:
Number of points and number of cubes are collected everyday at 23:59 EST/EDT via a cron job. These numbers are collected for all the players (no matter, if someone has or hasn’t the script installed), because it will also be used for an extenion for the original Stats window (the one with the map).
As for the other data (trailblazes, scythes and completes) things are a little bit more complicated. After each tbing, scything or completing, the data is collected from the EW server. To be precise the data is collected 15 s after each of the operations. If another operation is done within that time, the counter is reset. In other words: data is collected from EW server after 15s after the last successful operation. This is done to not unnecessary increase the traffic to the EW server when one makes one tb after another or a series of scything and completing.
The data for the current day, week and month is collected in the localStorage (on user’s computer). When the browser and the EW page is loaded another day, the first thing is to send all the data for each past period to the server and then the previous and the best data is downloaded from the server. This is also the moment, when the data for the graphs is downloaded from the server.
Example:
-you play however you like and the data is collected in the localStorage,
-you refresh the EW page or reopen the browser or turn off the computer and turn it on the next day or any other day,
-after the page has been loaded, the script checks if current (hq time) date is the same as the date of last update from the script server (the date of the last update is also stored in the localStorage).
– if the dates are the same, no update, neither on the client, nor on the server, side is performed,
– if the dates are different, the data from the client is sent to server and the server returns updated previous, best and charts data

  • date of the last update in the localStorage is set to today’s date.

Don’t worry, if you don’t play everyday or use more than one browser profile/browser/device to play EW. If the script is installed on every device, you play, everything should work ok (if not, some data might be missing).
So, if you have played for some time of a day on one computer, then changed to some other, the first one will have older data, than the latter. If on the next day you first run the first computer then the second, then the data for then-yesterday will be first updated from the first computer, then from the second one. If you first run the second computer, then the first one, the data from the second computer will be sent to server and then also the data from the first computer will be sent to the server, but because the data from the first computer has smaller values (you have played on it earlier the previous day), it won’t be written to the db.

During the development I had a lot of recurring bugs. I hope, I fixed them all, but spes mater stultorum, lol.

If you find anything wrong, please report it here or on the chat, while I’m online. But, for a few days, I will be fixing only blockers and security holes, because I really want to add the ability to display Stats (the one with the map) for a custom period (the button for that is already in the script, but it doesn’t do anything now) before the New Year.

P.S.
Some stats :slight_smile:
The script currently consists of about:
400 lines of SQL
300 lines of PHP
600 lines of CSS
3400 lines of JS

3 Likes

Incredible! Ty! :smiley:

1 Like

Amazing! Wonderful! Three cheers!

Chris is working on a way that will make it easier for players to install Eyewire extensions so that more people can see this beautiful work! Soon, hopefully!

2 Likes

Not sure it’s a bug, but if I open more than one concurrent ew tabs, say 2 or 3 or more, the stats/profile loads only on the tab that last opened/refreshed, all others won’t load (stats).

I wasn’t able to reproduce it, however I have updated some server scripts (changed MySQLi to PDO) to prevent some problems with db queries not being closed, when they should. That (unfinished queries, not the change xD ) could be the reason for the behaviour, you’re talking about, though, the reason might be in a totally different place.

1 Like

So I was checking my profile, then suddenly,

This happened lol
Even after viewing in fullscreen, it still doesn’t seem to fit within my monitor size and I can’t seem to find any way to resize it. Is there a way to automatically find the viewport size of the monitor and resize the windows accordingly? My display is 1366768 btw, and when viewed normally (not fullscreen), it’s 1366637.

1 Like

my window is also a bit too big, like randoms pic at the top and missing the link at bottom

1 Like

Yeah, I know about the problem. For now, I just wanted to release it (and do a public testing :wink: ). In not so distant future, I’mn planning to either add a scrollbar or some kind of responsize design. Currently the profile window is 800px height and it barely fits on 1080p But, like I said, it’s a first iteration.

I’m open to any suggestions, changes, things to add or remove, etc.

1 Like

ver. 2.0.1

Small fixing update:
FIXED weeks shown in the Profile stats chart (the last one was the current one, while it should be the last completed one)
Also a little FIX on the server side to correctly save weeks’ dates.

ver. 2.0.2
And another small update.
FIXED behaviour of the text to the right of accuracy bars. When a player scythed a cube, it was showing (correctly) a value of “–”, but after refreshing from the server, the value was changed to “100%”. Not it continuously shows “–”.

1 Like

I have this small “test” thing up right corner, I think I’ve also seen it in one of your screenshots here? lol How do I get rid of it? lol

1 Like

lol, i like how the url contains MMM

1 Like

lol your complaints to imgur’s auto name generator :stuck_out_tongue:

Oops, sorry about that :smiley:
I have this constant named DEBUG. When I’m releasing a public version, I’m changing its value to false and in the dev version it’s set to true. When it’s true, it allows me to make the script working with dev versions of the server scripts and adds the Test button which I’m using to invoke some server functions without a need to refresh the EW page all the time.

In the last release the constant was switched to false, but I forgot to add the Test button under condition checking if the constant is true or false, hence the button was always visible xD

Just update to ver. 2.0.3 which:
FIXES the Test button near the top being always visible.

1 Like

lol np ty for the explanation and the fix :slight_smile:

1 Like