On the settings page (/admin/config/development/modernizr) there is a list of tests that the module knows about. Clicking through to the Modernizr site loads a page with those options pre-populated. However, if an admin adds additional tests manually, they are not reported back to Drupal. Visiting the settings page a second time will produce a link that lacks the manual additions that were selected on the initial build.

It would be great if the module could peek at modernizr.min.js and include any flags listed within the JS file.

There's a URL back to the generator in every Modernizr build. It is fairly trivial to break this up into the exact set of data we need.

Comments

rupl’s picture

Status: Active » Closed (fixed)

Ok, this is committed to dev. This functionality is created by implementing the module's own hook_modernizr_info_alter() in order to ensure maximum Drupal-ness ;)

http://drupalcode.org/project/modernizr.git/commitdiff/b24dde54

The alter hook grabs the custom build URL out of the current modernizr.js, and only adds each test if it doesn't already exist. So any module that implements hook_modernizr_info() will show up as the "owner" of the test(s) they specify.

This was the last to-do before 3.0. Hooray!