Remove cryptpad-common dependency for some inner apps

This commit is contained in:
yflory
2017-11-13 18:09:19 +01:00
parent 1514ad5df3
commit 7cfe64fc5b
16 changed files with 35 additions and 173 deletions

View File

@@ -47,7 +47,6 @@ define([
var userNameKey = common.userNameKey = 'User_name';
var fileHashKey = common.fileHashKey = 'FS_hash';
common.displayNameKey = 'cryptpad.username';
var newPadNameKey = common.newPadNameKey = "newPadName";
var newPadPathKey = common.newPadPathKey = "newPadPath";
common.oldStorageKey = 'CryptPad_RECENTPADS';
common.storageKey = 'filesData';
@@ -716,19 +715,6 @@ define([
});
};
var errorHandlers = [];
common.onError = function (h) {
if (typeof h !== "function") { return; }
errorHandlers.push(h);
};
common.storeError = function () {
errorHandlers.forEach(function (h) {
if (typeof h === "function") {
h({type: "store"});
}
});
};
/*
* Buttons
*/
@@ -1145,10 +1131,6 @@ define([
return void setTimeout(function () { f(void 0, env); });
}
if (sessionStorage[newPadNameKey]) {
common.initialName = sessionStorage[newPadNameKey];
delete sessionStorage[newPadNameKey];
}
if (sessionStorage[newPadPathKey]) {
common.initialPath = sessionStorage[newPadPathKey];
delete sessionStorage[newPadPathKey];