commento.js: prefix commenterToken with commento

This commit is contained in:
Adhityaa 2018-06-20 09:03:40 +05:30
parent ef0f45527a
commit be85a911aa

View File

@ -193,7 +193,7 @@
function commenterTokenGet() { function commenterTokenGet() {
var commenterToken = cookieGet("commenterToken"); var commenterToken = cookieGet("commentoCommenterToken");
if (commenterToken === undefined) if (commenterToken === undefined)
return "anonymous"; return "anonymous";
@ -202,7 +202,7 @@
global.logout = function() { global.logout = function() {
cookieSet("commenterToken", "anonymous"); cookieSet("commentoCommenterToken", "anonymous");
refreshAll(); refreshAll();
} }
@ -221,7 +221,7 @@
post(origin + "/api/commenter/self", json, function(resp) { post(origin + "/api/commenter/self", json, function(resp) {
if (!resp.success) { if (!resp.success) {
cookieSet("commenterToken", "anonymous"); cookieSet("commentoCommenterToken", "anonymous");
call(callback); call(callback);
return; return;
} }
@ -970,7 +970,7 @@
global.commentoAuth = function(provider) { global.commentoAuth = function(provider) {
if (provider == "anonymous") { if (provider == "anonymous") {
cookieSet("commenterToken", "anonymous"); cookieSet("commentoCommenterToken", "anonymous");
chosenAnonymous = true; chosenAnonymous = true;
refreshAll(); refreshAll();
return; return;
@ -984,7 +984,7 @@
return; return;
} }
cookieSet("commenterToken", resp.commenterToken); cookieSet("commentoCommenterToken", resp.commenterToken);
popup.location = origin + "/api/oauth/" + provider + "/redirect?commenterToken=" + resp.commenterToken; popup.location = origin + "/api/oauth/" + provider + "/redirect?commenterToken=" + resp.commenterToken;
@ -1155,7 +1155,7 @@
return return
} }
cookieSet("commenterToken", resp.commenterToken); cookieSet("commentoCommenterToken", resp.commenterToken);
refreshAll(); refreshAll();
}); });
} }