https://github.com/abrahamjuliot/creepjs
This illustrates lots of techniques and how to implement them.
The most interesting to me is "lie" detection. If your browser attempts to give some false data, like when using the chameleon plugin, there are ways to verify a lot of it with javascript.
But check out the readme for detailed info and try it yourself on the webpage to see what it can gather from your setup. https://abrahamjuliot.github.io/creepjs/