Fix account.html and channelist.html cookies
This commit is contained in:
parent
9c9ed754b1
commit
db1682fc35
|
@ -31,8 +31,8 @@ function onLogin() {
|
||||||
$("#register").hide();
|
$("#register").hide();
|
||||||
loggedin = true;
|
loggedin = true;
|
||||||
$("#login").text("Logout");
|
$("#login").text("Logout");
|
||||||
createCookie("sync_uname", uname, 7);
|
createCookie("cytube_uname", uname, 7);
|
||||||
createCookie("sync_session", session, 7);
|
createCookie("cytube_session", session, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeTabCallback(tabid, paneid) {
|
function makeTabCallback(tabid, paneid) {
|
||||||
|
@ -341,8 +341,8 @@ $("#login").click(function() {
|
||||||
else {
|
else {
|
||||||
uname = "";
|
uname = "";
|
||||||
session = "";
|
session = "";
|
||||||
eraseCookie("sync_uname");
|
eraseCookie("cytube_uname");
|
||||||
eraseCookie("sync_session");
|
eraseCookie("cytube_session");
|
||||||
$("#accountnav li")[0].innerHTML = "Not Logged In";
|
$("#accountnav li")[0].innerHTML = "Not Logged In";
|
||||||
$("#register").show();
|
$("#register").show();
|
||||||
$("#login").text("Login");
|
$("#login").text("Login");
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
$.getJSON(WEB_URL+"/api/json/login?name="+uname+"&session="+session+"&callback=?", function(data) {
|
$.getJSON(WEB_URL+"/api/json/login?name="+uname+"&session="+session+"&callback=?", function(data) {
|
||||||
if(data.success) {
|
if(data.success) {
|
||||||
$(".loginform").remove();
|
$(".loginform").remove();
|
||||||
createCookie("sync_uname", uname, 7);
|
createCookie("cytube_uname", uname, 7);
|
||||||
createCookie("sync_session", session, 7);
|
createCookie("cytube_session", session, 7);
|
||||||
p = "name=" + uname + "&session=" + session;
|
p = "name=" + uname + "&session=" + session;
|
||||||
refresh();
|
refresh();
|
||||||
setInterval(refresh, 5000);
|
setInterval(refresh, 5000);
|
||||||
|
@ -68,8 +68,8 @@
|
||||||
if(data.success) {
|
if(data.success) {
|
||||||
$(".loginform").remove();
|
$(".loginform").remove();
|
||||||
session = data.session;
|
session = data.session;
|
||||||
createCookie("sync_uname", uname, 7);
|
createCookie("cytube_uname", uname, 7);
|
||||||
createCookie("sync_session", session, 7);
|
createCookie("cytube_session", session, 7);
|
||||||
p = "name=" + uname + "&session=" + session;
|
p = "name=" + uname + "&session=" + session;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue