44a4ff3b52
Let install view manage the connection to the provisioning socket as well as cleaning up the window on completion, simplifying options.js. Call `remove` so that the view stops listening when the window closes. Move view script and template to background page. Adds ability to hide nav if this isn't our first run. // FREEBIE
25 lines
744 B
JavaScript
25 lines
744 B
JavaScript
/*
|
|
* vim: ts=4:sw=4:expandtab
|
|
*/
|
|
;(function() {
|
|
'use strict';
|
|
extension.windows.getBackground(function(bg) {
|
|
bg.storage.onready(function() {
|
|
$(function() {
|
|
var Whisper = bg.Whisper;
|
|
var installView = new Whisper.InstallView({
|
|
el: $('#install')
|
|
});
|
|
if (Whisper.Registration.everDone()) {
|
|
installView.selectStep(3);
|
|
installView.hideDots();
|
|
}
|
|
installView.$el.show();
|
|
Whisper.events.on('contactsync', function() {
|
|
bg.openInbox();
|
|
window.close();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
})();
|