Nit: I'd invert this like so:

```
if (!navigator.mozNfc)
  return;
/* the rest of the function */
```

That keeps the indentation a little less deep.