Added saving of token to web worker + Play with dark theme

This commit is contained in:
Hydroxycarbamide 2022-06-04 00:12:18 +02:00
parent 7d893cb204
commit 12f9ad6c06
4 changed files with 47 additions and 5 deletions

View file

@ -0,0 +1,16 @@
self.onmessage = function (event) {
console.log(event.data);
const action = event.data.action;
switch(action) {
case 'save':
token = event.data.token;
break;
case 'load':
console.log(token);
break;
default:
console.error('Invalid action');
return;
}
self.postMessage(true);
}