Namespace is a problem. Every part of the code is tied to contacts.js
<script type='text/javascript'>
// This code is a snippet from contacts.js
var setCurrent = function c_setCurrent(contact) {
currentContact = contact;
if ('mozNfc' in navigator && contacts.NFC) {
contacts.NFC.startListening(contact);
}
if (contacts.Details) {
contacts.Details.setContact(contact);
}
};
</script>
It's in JS and DOM :S
<script type='text/javascript'>
if (fb.isFbContact(contact)) {
if (!fb.isFbLinked(contact)) {
var fbContact = new fb.Contact(contact);
//...
}
// ...
var getPhones = function getPhones(contact) {
var selector = '#view-contact-form form div.phone-template:not(.facebook)';
var phones = dom.querySelectorAll(selector);
// ...
};
}
// And is in the HTML as well! :S
</script>