Make sure the Hub is shown when opening a new window by calling addNdnHubChangedListener on the window load event so that the ndnHubLabel is defined.
diff --git a/js/ndnProtocol/content/ndnToolbar.js b/js/ndnProtocol/content/ndnToolbar.js
index 3d000f3..20518a3 100644
--- a/js/ndnProtocol/content/ndnToolbar.js
+++ b/js/ndnProtocol/content/ndnToolbar.js
@@ -51,5 +51,4 @@
document.getElementById("ndnHubLabel").setAttribute("value", "Hub: " + host + ":" + port);
}
-// Assume that addNdnHubChangedListener is defined since we imported NdnProtocolInfo.jsm above.
-addNdnHubChangedListener(onNdnHubChanged);
+window.addEventListener("load", function() { addNdnHubChangedListener(onNdnHubChanged); }, false);