Fix broken registration flow
Better load the functions defined in chromium.js before trying to use them. Hmm.. also, options.js should probably wait for the DOM to load before it tries to initialize things in it.
This commit is contained in:
parent
d9bf0a41fb
commit
de0a1df3ca
2 changed files with 9 additions and 7 deletions
|
@ -139,10 +139,12 @@ $('#init-go').click(function() {
|
|||
});
|
||||
|
||||
textsecure.registerOnLoadFunction(function() {
|
||||
if (!isRegistrationDone()) {
|
||||
$('#init-setup').show();
|
||||
} else {
|
||||
$('#complete-number').html(textsecure.storage.getUnencrypted("number_id").split(".")[0]);
|
||||
$('#setup-complete').show();
|
||||
}
|
||||
$(function() {
|
||||
if (!isRegistrationDone()) {
|
||||
$('#init-setup').show();
|
||||
} else {
|
||||
$('#complete-number').html(textsecure.storage.getUnencrypted("number_id").split(".")[0]);
|
||||
$('#setup-complete').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<script type="text/javascript" src="js/crypto.js"></script>
|
||||
<script type="text/javascript" src="js/api.js"></script>
|
||||
<script type="text/javascript" src="js/helpers.js"></script>
|
||||
<script type="text/javascript" src="js/options.js"></script>
|
||||
<script type="text/javascript" src="js/chromium.js"></script>
|
||||
<script type="text/javascript" src="js/options.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue