fix undefined reference
parent
6909f663b6
commit
3a338e0890
|
@ -134,15 +134,6 @@ define([
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
var requestLogin = function () {
|
|
||||||
// log out so that you don't go into an endless loop...
|
|
||||||
Cryptpad.logout();
|
|
||||||
|
|
||||||
// redirect them to log in, and come back when they're done.
|
|
||||||
sessionStorage.redirectTo = window.location.href;
|
|
||||||
window.location.href = '/login/';
|
|
||||||
};
|
|
||||||
|
|
||||||
var tryParsing = function (x) {
|
var tryParsing = function (x) {
|
||||||
try { return JSON.parse(x); }
|
try { return JSON.parse(x); }
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
@ -162,6 +153,15 @@ define([
|
||||||
f(void 0, store);
|
f(void 0, store);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var requestLogin = function (Cryptpad) {
|
||||||
|
// log out so that you don't go into an endless loop...
|
||||||
|
Cryptpad.logout();
|
||||||
|
|
||||||
|
// redirect them to log in, and come back when they're done.
|
||||||
|
sessionStorage.redirectTo = window.location.href;
|
||||||
|
window.location.href = '/login/';
|
||||||
|
};
|
||||||
|
|
||||||
if (Cryptpad.isLoggedIn()) {
|
if (Cryptpad.isLoggedIn()) {
|
||||||
/* This isn't truly secure, since anyone who can read the user's object can
|
/* This isn't truly secure, since anyone who can read the user's object can
|
||||||
set their local loginToken to match that in the object. However, it exposes
|
set their local loginToken to match that in the object. However, it exposes
|
||||||
|
|
Loading…
Reference in New Issue