adding time sync
This commit is contained in:
@@ -108,11 +108,12 @@ chrome.runtime.onConnect.addListener((port) => {
|
||||
.collection('rooms')
|
||||
.doc(roomId)
|
||||
.collection('messages')
|
||||
.orderBy('time')
|
||||
.onSnapshot(
|
||||
(snap) => {
|
||||
if (snap)
|
||||
port.postMessage({ messages: snap.docs.map((v) => ({ ...v.data(), id: v.id })) });
|
||||
port.postMessage({
|
||||
messages: snap.docs.map((v) => ({ ...v.data(), id: v.id })),
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
port.postMessage({ isError: true, ...err });
|
||||
|
||||
+12
-1
@@ -6,7 +6,12 @@
|
||||
"background": {
|
||||
"page": "popup.html"
|
||||
},
|
||||
"permissions": ["https://*.hulu.com/*", "https://*.netflix.com/*", "https://*.amazon.com/*"],
|
||||
"permissions": [
|
||||
"https://*.hulu.com/*",
|
||||
"https://*.netflix.com/*",
|
||||
"https://*.amazon.com/*",
|
||||
"https://*.disneyplus.com/*"
|
||||
],
|
||||
"content_security_policy": "script-src 'self' https://www.gstatic.com/ https://*.firebaseio.com https://www.googleapis.com; object-src 'self'",
|
||||
"content_scripts": [
|
||||
{
|
||||
@@ -26,6 +31,12 @@
|
||||
"run_at": "document_idle",
|
||||
"js": ["/static/js/content.js"],
|
||||
"css": ["/static/css/app.css"]
|
||||
},
|
||||
{
|
||||
"matches": ["https://*.disneyplus.com/*"],
|
||||
"run_at": "document_idle",
|
||||
"js": ["/static/js/content.js"],
|
||||
"css": ["/static/css/app.css"]
|
||||
}
|
||||
],
|
||||
"web_accessible_resources": ["android-icon-192x192.png"],
|
||||
|
||||
Reference in New Issue
Block a user