topeterk / HitCounterManager

Free Hit Counter / Death Counter that is running in the background, so you can focus on your stream. No need to keep any windows open for a window capture any more. Initially designed for Dark Souls and similar games but supports any game.
MIT License
86 stars 20 forks source link

split color #2

Closed chemileon closed 7 years ago

chemileon commented 7 years ago

hey! i noticed my splits are always red, even when "better" than on my pb. html file source code states td.better as green.. how is td.better defined? i only get green splits when 0 hits, not when less than on pb. how so? how to change it? thx in advance chemi

topeterk commented 7 years ago

Hi, sorry that my answer comes quite late.

I guess you are using the "numeric" HTML files...

You can find this expression in the HTML file's javascript code: (list[i][1] == 0 ? 'better' : 'worse') Since the goal is getting 0 hits by default, anything thats more is "bad" and gets red. However, you can try to change this to that expression: (list[i][1] <= list[i][2] ? 'better' : 'worse')

Hopefully that works for you.

Cheers

PS: Would be nice to give me feedback if that works as you would expect it.

chemileon commented 7 years ago

hey, yes, this works! but: obviously this also shows splits that are the same in green (no matter if it is splits with hits or without) because the <= .. if i change that to < only then of course it shows splits with 0/0/0 as red.. man logic is a bitch :D last time i worked with html and javascript was about 5 years ago.. but i figured it out: (list[i][1] < list[i][2] || list[i][1] == 0 ? 'better' : 'worse') does the trick!

thx for the help :)

topeterk commented 7 years ago

Hey,

glad to hear that I was able to help you.

you're welcome :)

PS: I committed an update of the HTML files today. I would recommend to get them from the sources just to prevent problems when the HTML files are kept open for a longer period of time.