From 44f5cd316c72b6c996b7eaa03f4233ed743545ed Mon Sep 17 00:00:00 2001 From: Paul Sori Date: Mon, 12 Nov 2018 00:10:26 -0500 Subject: [PATCH] remove cookies --- public/favicon/manifest.json | 1 - public/js/mstream.js | 6 +----- public/js/mstream.vue-player-controls.js | 7 +------ public/js/winamp.js | 3 +-- public/remote.html | 5 ----- 5 files changed, 3 insertions(+), 19 deletions(-) diff --git a/public/favicon/manifest.json b/public/favicon/manifest.json index d492977..e6e5a14 100644 --- a/public/favicon/manifest.json +++ b/public/favicon/manifest.json @@ -4,7 +4,6 @@ "description": "Music Streaming App", "background_color": "#333333", "permissions": [ - "cookies", "downloads", "background", "" diff --git a/public/js/mstream.js b/public/js/mstream.js index 0cc2545..9a0dd79 100755 --- a/public/js/mstream.js +++ b/public/js/mstream.js @@ -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) { diff --git a/public/js/mstream.vue-player-controls.js b/public/js/mstream.vue-player-controls.js index 338283d..c84390c 100644 --- a/public/js/mstream.vue-player-controls.js +++ b/public/js/mstream.vue-player-controls.js @@ -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)); } diff --git a/public/js/winamp.js b/public/js/winamp.js index 4a5d7a0..76428c6 100644 --- a/public/js/winamp.js +++ b/public/js/winamp.js @@ -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); } diff --git a/public/remote.html b/public/remote.html index 1258ed3..2c4b3de 100644 --- a/public/remote.html +++ b/public/remote.html @@ -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