borismus/device.js — pull request #11 by piouPiouM (2013-03-19 23:28:06+00:00)
Title: Enhance the detection of touch.

Currently, if a person provided extra spaces around the colon (that is valid), then the touch detection fails.

Take as an example the following media attribute:

'only screen and (touch-enabled : 0)'

The regexp `MQ_TOUCH` not will capture anything (because of space inserted before the colon) and then the mediaquerie will be relayed to Moderniz that, if the browser supports it, test it with `matchMedia`. Howerer, `touch-enabled` is not standardized, so the result will always be negative.