|
|
@ -47,6 +47,15 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var PINNING_ENABLED = AppConfig.enablePinning;
|
|
|
|
var PINNING_ENABLED = AppConfig.enablePinning;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// COMMON
|
|
|
|
|
|
|
|
common.getLanguage = function () {
|
|
|
|
|
|
|
|
return Messages._languageUsed;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
common.setLanguage = function (l, cb) {
|
|
|
|
|
|
|
|
Language.setLanguage(l, null, cb);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// RESTRICTED
|
|
|
|
// RESTRICTED
|
|
|
|
// Settings only
|
|
|
|
// Settings only
|
|
|
|
common.getUserObject = function (cb) {
|
|
|
|
common.getUserObject = function (cb) {
|
|
|
@ -119,14 +128,125 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// REFACTOR pull language directly?
|
|
|
|
// RPC
|
|
|
|
common.getLanguage = function () {
|
|
|
|
common.pinPads = function (pads, cb) {
|
|
|
|
return Messages._languageUsed;
|
|
|
|
postMessage("PIN_PADS", pads, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj.hash);
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
common.setLanguage = function (l, cb) {
|
|
|
|
|
|
|
|
Language.setLanguage(l, null, cb);
|
|
|
|
common.unpinPads = function (pads, cb) {
|
|
|
|
|
|
|
|
postMessage("UNPIN_PADS", pads, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj.hash);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getPinnedUsage = function (cb) {
|
|
|
|
|
|
|
|
postMessage("GET_PINNED_USAGE", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj.bytes);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.updatePinLimit = function (cb) {
|
|
|
|
|
|
|
|
postMessage("UPDATE_PIN_LIMIT", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.limit, obj.plan, obj.note);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getPinLimit = function (cb) {
|
|
|
|
|
|
|
|
postMessage("GET_PIN_LIMIT", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.limit, obj.plan, obj.note);
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.isOverPinLimit = function (cb) {
|
|
|
|
|
|
|
|
if (!LocalStore.isLoggedIn()) { return void cb(null, false); }
|
|
|
|
|
|
|
|
var usage;
|
|
|
|
|
|
|
|
var andThen = function (e, limit, plan) {
|
|
|
|
|
|
|
|
if (e) { return void cb(e); }
|
|
|
|
|
|
|
|
var data = {usage: usage, limit: limit, plan: plan};
|
|
|
|
|
|
|
|
if (usage > limit) {
|
|
|
|
|
|
|
|
return void cb (null, true, data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return void cb (null, false, data);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var todo = function (e, used) {
|
|
|
|
|
|
|
|
if (e) { return void cb(e); }
|
|
|
|
|
|
|
|
usage = used;
|
|
|
|
|
|
|
|
common.getPinLimit(andThen);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
common.getPinnedUsage(todo);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.clearOwnedChannel = function (channel, cb) {
|
|
|
|
|
|
|
|
postMessage("CLEAR_OWNED_CHANNEL", channel, cb);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.uploadComplete = function (cb) {
|
|
|
|
|
|
|
|
postMessage("UPLOAD_COMPLETE", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.uploadStatus = function (size, cb) {
|
|
|
|
|
|
|
|
postMessage("UPLOAD_STATUS", {size: size}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.uploadCancel = function (cb) {
|
|
|
|
|
|
|
|
postMessage("UPLOAD_CANCEL", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.uploadChunk = function (data, cb) {
|
|
|
|
|
|
|
|
postMessage("UPLOAD_CHUNK", {chunk: data}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ANON RPC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SFRAME: talk to anon_rpc from the iframe
|
|
|
|
|
|
|
|
common.anonRpcMsg = function (msg, data, cb) {
|
|
|
|
|
|
|
|
if (!msg) { return; }
|
|
|
|
|
|
|
|
postMessage("ANON_RPC_MESSAGE", {
|
|
|
|
|
|
|
|
msg: msg,
|
|
|
|
|
|
|
|
data: data
|
|
|
|
|
|
|
|
}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getFileSize = function (href, cb) {
|
|
|
|
|
|
|
|
postMessage("GET_FILE_SIZE", {href: href}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.size);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getMultipleFileSize = function (files, cb) {
|
|
|
|
|
|
|
|
postMessage("GET_MULTIPLE_FILE_SIZE", {files:files}, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.size);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Store
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getMetadata = function (cb) {
|
|
|
|
common.getMetadata = function (cb) {
|
|
|
|
postMessage("GET_METADATA", null, function (obj) {
|
|
|
|
postMessage("GET_METADATA", null, function (obj) {
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
@ -138,7 +258,6 @@ define([
|
|
|
|
postMessage("SET_DISPLAY_NAME", value, cb);
|
|
|
|
postMessage("SET_DISPLAY_NAME", value, cb);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// STORAGE
|
|
|
|
|
|
|
|
common.setPadAttribute = function (attr, value, cb, href) {
|
|
|
|
common.setPadAttribute = function (attr, value, cb, href) {
|
|
|
|
href = Hash.getRelativeHref(href || window.location.href);
|
|
|
|
href = Hash.getRelativeHref(href || window.location.href);
|
|
|
|
postMessage("SET_PAD_ATTRIBUTE", {
|
|
|
|
postMessage("SET_PAD_ATTRIBUTE", {
|
|
|
@ -178,7 +297,6 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Tags
|
|
|
|
// Tags
|
|
|
|
common.resetTags = function (href, tags, cb) {
|
|
|
|
common.resetTags = function (href, tags, cb) {
|
|
|
|
// set pad attribute
|
|
|
|
// set pad attribute
|
|
|
@ -320,133 +438,52 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
common.pinPads = function (pads, cb) {
|
|
|
|
// Messaging (manage friends from the userlist)
|
|
|
|
postMessage("PIN_PADS", pads, function (obj) {
|
|
|
|
common.inviteFromUserlist = function (netfluxId, cb) {
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
postMessage("INVITE_FROM_USERLIST", {
|
|
|
|
cb(null, obj.hash);
|
|
|
|
netfluxId: netfluxId,
|
|
|
|
});
|
|
|
|
href: window.location.href
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.unpinPads = function (pads, cb) {
|
|
|
|
|
|
|
|
postMessage("UNPIN_PADS", pads, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj.hash);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getPinnedUsage = function (cb) {
|
|
|
|
|
|
|
|
postMessage("GET_PINNED_USAGE", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj.bytes);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SFRAME: talk to anon_rpc from the iframe
|
|
|
|
|
|
|
|
common.anonRpcMsg = function (msg, data, cb) {
|
|
|
|
|
|
|
|
if (!msg) { return; }
|
|
|
|
|
|
|
|
postMessage("ANON_RPC_MESSAGE", {
|
|
|
|
|
|
|
|
msg: msg,
|
|
|
|
|
|
|
|
data: data
|
|
|
|
|
|
|
|
}, function (obj) {
|
|
|
|
}, function (obj) {
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
cb(null, obj);
|
|
|
|
cb();
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getFileSize = function (href, cb) {
|
|
|
|
|
|
|
|
postMessage("GET_FILE_SIZE", {href: href}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.size);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO not used anymore?
|
|
|
|
|
|
|
|
common.getMultipleFileSize = function (files, cb) {
|
|
|
|
|
|
|
|
postMessage("GET_MULTIPLE_FILE_SIZE", {files:files}, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.size);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.updatePinLimit = function (cb) {
|
|
|
|
|
|
|
|
postMessage("UPDATE_PIN_LIMIT", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.limit, obj.plan, obj.note);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common.getPinLimit = function (cb) {
|
|
|
|
|
|
|
|
postMessage("GET_PIN_LIMIT", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(undefined, obj.limit, obj.plan, obj.note);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
common.isOverPinLimit = function (cb) {
|
|
|
|
// Messenger
|
|
|
|
if (!LocalStore.isLoggedIn()) { return void cb(null, false); }
|
|
|
|
var messenger = common.messenger = {};
|
|
|
|
var usage;
|
|
|
|
messenger.getFriendList = function (cb) {
|
|
|
|
var andThen = function (e, limit, plan) {
|
|
|
|
postMessage("CONTACTS_GET_FRIEND_LIST", null, cb);
|
|
|
|
if (e) { return void cb(e); }
|
|
|
|
|
|
|
|
var data = {usage: usage, limit: limit, plan: plan};
|
|
|
|
|
|
|
|
if (usage > limit) {
|
|
|
|
|
|
|
|
return void cb (null, true, data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return void cb (null, false, data);
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var todo = function (e, used) {
|
|
|
|
messenger.getMyInfo = function (cb) {
|
|
|
|
if (e) { return void cb(e); }
|
|
|
|
postMessage("CONTACTS_GET_MY_INFO", null, cb);
|
|
|
|
usage = used;
|
|
|
|
|
|
|
|
common.getPinLimit(andThen);
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
common.getPinnedUsage(todo);
|
|
|
|
messenger.getFriendInfo = function (curvePublic, cb) {
|
|
|
|
|
|
|
|
postMessage("CONTACTS_GET_FRIEND_INFO", curvePublic, cb);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
messenger.removeFriend = function (curvePublic, cb) {
|
|
|
|
common.clearOwnedChannel = function (channel, cb) {
|
|
|
|
postMessage("CONTACTS_REMOVE_FRIEND", curvePublic, cb);
|
|
|
|
postMessage("CLEAR_OWNED_CHANNEL", {channel: channel}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
messenger.openFriendChannel = function (curvePublic, cb) {
|
|
|
|
common.uploadChunk = function (data, cb) {
|
|
|
|
postMessage("CONTACTS_OPEN_FRIEND_CHANNEL", curvePublic, cb);
|
|
|
|
postMessage("UPLOAD_CHUNK", {chunk: data}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
messenger.getFriendStatus = function (curvePublic, cb) {
|
|
|
|
common.uploadComplete = function (cb) {
|
|
|
|
postMessage("CONTACTS_GET_FRIEND_STATUS", curvePublic, cb);
|
|
|
|
postMessage("UPLOAD_COMPLETE", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
messenger.getMoreHistory = function (data, cb) {
|
|
|
|
common.uploadStatus = function (size, cb) {
|
|
|
|
postMessage("CONTACTS_GET_MORE_HISTORY", data, cb);
|
|
|
|
postMessage("UPLOAD_STATUS", {size: size}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
messenger.sendMessage = function (data, cb) {
|
|
|
|
common.uploadCancel = function (cb) {
|
|
|
|
postMessage("CONTACTS_SEND_MESSAGE", data, cb);
|
|
|
|
postMessage("UPLOAD_CANCEL", null, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb(null, obj);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
messenger.setChannelHead = function (data, cb) {
|
|
|
|
// Messaging
|
|
|
|
postMessage("CONTACTS_SET_CHANNEL_HEAD", data, cb);
|
|
|
|
common.inviteFromUserlist = function (netfluxId, cb) {
|
|
|
|
|
|
|
|
postMessage("INVITE_FROM_USERLIST", {
|
|
|
|
|
|
|
|
netfluxId: netfluxId,
|
|
|
|
|
|
|
|
href: window.location.href
|
|
|
|
|
|
|
|
}, function (obj) {
|
|
|
|
|
|
|
|
if (obj && obj.error) { return void cb(obj.error); }
|
|
|
|
|
|
|
|
cb();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
messenger.onMessageEvent = Util.mkEvent();
|
|
|
|
|
|
|
|
messenger.onJoinEvent = Util.mkEvent();
|
|
|
|
|
|
|
|
messenger.onLeaveEvent = Util.mkEvent();
|
|
|
|
|
|
|
|
messenger.onUpdateEvent = Util.mkEvent();
|
|
|
|
|
|
|
|
messenger.onFriendEvent = Util.mkEvent();
|
|
|
|
|
|
|
|
messenger.onUnfriendEvent = Util.mkEvent();
|
|
|
|
|
|
|
|
|
|
|
|
// HERE
|
|
|
|
// HERE
|
|
|
|
common.getShareHashes = function (secret, cb) {
|
|
|
|
common.getShareHashes = function (secret, cb) {
|
|
|
@ -540,6 +577,25 @@ define([
|
|
|
|
common.onFriendComplete(data);
|
|
|
|
common.onFriendComplete(data);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Messenger
|
|
|
|
|
|
|
|
case 'CONTACTS_MESSAGE': {
|
|
|
|
|
|
|
|
common.messenger.onMessageEvent.fire(data); break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case 'CONTACTS_JOIN': {
|
|
|
|
|
|
|
|
common.messenger.onJoinEvent.fire(data); break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case 'CONTACTS_LEAVE': {
|
|
|
|
|
|
|
|
common.messenger.onLeaveEvent.fire(data); break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case 'CONTACTS_UPDATE': {
|
|
|
|
|
|
|
|
common.messenger.onUpdateEvent.fire(data); break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case 'CONTACTS_FRIEND': {
|
|
|
|
|
|
|
|
common.messenger.onFriendEvent.fire(data); break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case 'CONTACTS_UNFRIEND': {
|
|
|
|
|
|
|
|
common.messenger.onUnfriendEvent.fire(data); break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -547,7 +603,7 @@ define([
|
|
|
|
var env = {};
|
|
|
|
var env = {};
|
|
|
|
var initialized = false;
|
|
|
|
var initialized = false;
|
|
|
|
|
|
|
|
|
|
|
|
return function (f) {
|
|
|
|
return function (f, rdyCfg) {
|
|
|
|
if (initialized) {
|
|
|
|
if (initialized) {
|
|
|
|
return void setTimeout(function () { f(void 0, env); });
|
|
|
|
return void setTimeout(function () { f(void 0, env); });
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -583,7 +639,9 @@ define([
|
|
|
|
query: onMessage, // TODO temporary, will be replaced by a webworker channel
|
|
|
|
query: onMessage, // TODO temporary, will be replaced by a webworker channel
|
|
|
|
userHash: LocalStore.getUserHash(),
|
|
|
|
userHash: LocalStore.getUserHash(),
|
|
|
|
anonHash: LocalStore.getFSHash(),
|
|
|
|
anonHash: LocalStore.getFSHash(),
|
|
|
|
localToken: tryParsing(localStorage.getItem(Constants.tokenKey))
|
|
|
|
localToken: tryParsing(localStorage.getItem(Constants.tokenKey)),
|
|
|
|
|
|
|
|
language: common.getLanguage(),
|
|
|
|
|
|
|
|
messenger: rdyCfg.messenger
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (sessionStorage[Constants.newPadPathKey]) {
|
|
|
|
if (sessionStorage[Constants.newPadPathKey]) {
|
|
|
|
cfg.initialPath = sessionStorage[Constants.newPadPathKey];
|
|
|
|
cfg.initialPath = sessionStorage[Constants.newPadPathKey];
|
|
|
|