remove cookies

This commit is contained in:
Paul Sori 2018-11-12 00:10:26 -05:00
parent d5cbc12472
commit 44f5cd316c
5 changed files with 3 additions and 19 deletions

View File

@ -4,7 +4,6 @@
"description": "Music Streaming App",
"background_color": "#333333",
"permissions": [
"cookies",
"downloads",
"background",
"<all_urls>"

View File

@ -134,8 +134,7 @@ $(document).ready(function () {
return;
}
// Add the token to the cookies
Cookies.set('token', response.token);
// Local Storage
if (typeof(Storage) !== "undefined") {
localStorage.setItem("token", response.token);
}
@ -156,10 +155,7 @@ $(document).ready(function () {
function testIt() {
var token;
if (typeof(Storage) !== "undefined") {
// Retrieve
token = localStorage.getItem("token");
} else if(Cookies && Cookies.get('token')) {
token = Cookies.get('token')
}
if (token) {

View File

@ -211,19 +211,14 @@ var VUEPLAYER = (function () {
created: function () {
if (typeof(Storage) !== "undefined") {
this.curVol = localStorage.getItem("volume");
} else if(Cookies && Cookies.get('volume')) {
this.curVol = Cookies.get('volume');
MSTREAMPLAYER.changeVolume(parseInt(this.curVol));
}
MSTREAMPLAYER.changeVolume(parseInt(this.curVol));
},
watch: {
curVol: function () {
if (typeof(Storage) !== "undefined") {
localStorage.setItem("volume", this.curVol);
}
if (Cookies) {
Cookies.set('volume', parseInt(this.curVol));
}
MSTREAMPLAYER.changeVolume(parseInt(this.curVol));
}

View File

@ -126,8 +126,7 @@ $(document).ready(function () {
return;
}
// Add the token to the cookies
Cookies.set('token', response.token);
// Add the token to local storage
if (typeof(Storage) !== "undefined") {
localStorage.setItem("token", response.token);
}

View File

@ -164,11 +164,6 @@
// TODO: Handle guest controls
// TODO: Pull code from cookies and try it
function tryToGetCookieAndEatIt() {
var token = Cookies.get('code');
}
// Prompt user for code
// Check code against server