|
|
@ -698,6 +698,8 @@ define([
|
|
|
|
Cryptpad.alert(Messages.common_connectionLost);
|
|
|
|
Cryptpad.alert(Messages.common_connectionLost);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// don't initialize until the store is ready.
|
|
|
|
|
|
|
|
Cryptpad.ready(function () {
|
|
|
|
var config = {
|
|
|
|
var config = {
|
|
|
|
websocketURL: Cryptpad.getWebsocketURL(),
|
|
|
|
websocketURL: Cryptpad.getWebsocketURL(),
|
|
|
|
channel: secret.channel,
|
|
|
|
channel: secret.channel,
|
|
|
@ -708,10 +710,9 @@ define([
|
|
|
|
//readOnly: readOnly,
|
|
|
|
//readOnly: readOnly,
|
|
|
|
crypto: Crypto.createEncryptor(secret.keys),
|
|
|
|
crypto: Crypto.createEncryptor(secret.keys),
|
|
|
|
userName: 'poll',
|
|
|
|
userName: 'poll',
|
|
|
|
|
|
|
|
network: Cryptpad.getNetwork()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// don't initialize until the store is ready.
|
|
|
|
|
|
|
|
Cryptpad.ready(function () {
|
|
|
|
|
|
|
|
if (readOnly) {
|
|
|
|
if (readOnly) {
|
|
|
|
$('#commit, #create-user, #create-option, #publish, #admin').remove();
|
|
|
|
$('#commit, #create-user, #create-option, #publish, #admin').remove();
|
|
|
|
}
|
|
|
|
}
|
|
|
|