A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
chore: cleanup
Christian Fei0bf025d80f53
diff --git a/lib/server.js b/lib/server.jsindex c96b663..a5bdcc3 100644--- a/lib/server.js+++ b/lib/server.js@@ -10,21 +10,21 @@ export function createServer (repo = new Repository()) {const stateChangeHandler = {get(target, key) {if (typeof target[key] === 'object' && target[key] !== null) {- return new Proxy(target[key], stateChangeHandler);+ return new Proxy(target[key], stateChangeHandler)}- return target[key];+ return target[key]},set(target, prop, value) {if (target[prop] !== value) broadcastSSE(JSON.stringify({type: 'state', state: target}), connections)- target[prop] = value;+ target[prop] = valuereturn true- },- };+ }+ }const state = new Proxy({downloading: {},summarizing: {},- }, stateChangeHandler);+ }, stateChangeHandler)const connections = []