fix 1:1 demo to work with Olm.init()
This commit is contained in:
parent
fdf25eb3ba
commit
14c1db02fe
1 changed files with 8 additions and 2 deletions
|
@ -2,7 +2,13 @@
|
||||||
<head>
|
<head>
|
||||||
<script src="../olm.js"></script>
|
<script src="../olm.js"></script>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function (event) {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
Olm.init().then(function() {
|
||||||
|
demo();
|
||||||
|
});
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
function demo() {
|
||||||
function progress(who, message) {
|
function progress(who, message) {
|
||||||
var message_element = document.createElement("pre");
|
var message_element = document.createElement("pre");
|
||||||
var progress = document.getElementById(who + "_progress");
|
var progress = document.getElementById(who + "_progress");
|
||||||
|
@ -109,7 +115,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
glue_encrypt("bob", "alice", b_session);
|
glue_encrypt("bob", "alice", b_session);
|
||||||
glue_decrypt("alice", a_session);
|
glue_decrypt("alice", a_session);
|
||||||
});
|
});
|
||||||
}, false);
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in a new issue