mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
remove cookies
This commit is contained in:
parent
d5cbc12472
commit
44f5cd316c
@ -4,7 +4,6 @@
|
||||
"description": "Music Streaming App",
|
||||
"background_color": "#333333",
|
||||
"permissions": [
|
||||
"cookies",
|
||||
"downloads",
|
||||
"background",
|
||||
"<all_urls>"
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user