I've put together a simple adaptive-quality fragment shader example.

The code does not use any external libraries, so it might be educational for those who want to start playing with WebGL.

You can run it from this page: http://guciek.net/en/3d/adaptive_quality_webgl_example

Note that it was specifically meant to be simple!