I'm watching the contributions to the mobile support for plugins page with interest. The latest change - https://docs.moodle.org/dev/index.php?title=Mobile_support_for_plugins&diff=next&oldid=54590 - doesn't make it clear where you put this code/register this function. Does this go in the template, the javascript parameter of the function in mobile.php... I need to do something similar but can't see where to do it.
I've also submitted an edit which puts in the missing quote on the core-file directive but it doesn't seem to be getting picked up.