diff --git a/app/public/background.html b/app/public/background.html new file mode 100644 index 0000000..ddcc5ad --- /dev/null +++ b/app/public/background.html @@ -0,0 +1,54 @@ + + +
+ + + + + + + + + Hulu + Netflix + Prime Video + + diff --git a/app/public/background.js b/app/public/background.js index 0614d97..0adbc27 100644 --- a/app/public/background.js +++ b/app/public/background.js @@ -50,6 +50,13 @@ const sendAuth = async (sendResponse) => { sendResponse(firebase.auth().currentUser); }; +chrome.runtime.onInstalled.addListener(() => { + chrome.tabs.create({ + url: 'https://www.chromewatchparty.com/welcome', + active: true, + }); +}); + chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { const { type } = request; switch (type) { diff --git a/app/public/manifest.json b/app/public/manifest.json index 82643af..10ae023 100644 --- a/app/public/manifest.json +++ b/app/public/manifest.json @@ -4,7 +4,10 @@ "version": "1.4.2", "description": "Watch streamed content together.", "background": { - "page": "popup.html" + "page": "background.html" + }, + "browser_action": { + "default_popup": "popup.html" }, "permissions": [ "https://*.hulu.com/*", @@ -13,43 +16,20 @@ "https://*.disneyplus.com/*", "https://*.youtube.com/*", "https://play.hbonow.com/*", - "https://play.hbomax.com/*", - "http://localhost/*" + "https://play.hbomax.com/*" ], "content_security_policy": "script-src 'self' https://www.gstatic.com/ https://*.firebaseio.com https://www.googleapis.com; object-src 'self'", "content_scripts": [ { - "matches": ["https://*.hulu.com/*"], - "run_at": "document_idle", - "js": ["/static/js/content.js"], - "css": ["/static/css/app.css"] - }, - { - "matches": ["https://*.netflix.com/*"], - "run_at": "document_idle", - "js": ["/static/js/content.js"], - "css": ["/static/css/app.css"] - }, - { - "matches": ["https://*.amazon.com/*"], - "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"] - }, - { - "matches": ["https://*.youtube.com/*"], - "run_at": "document_idle", - "js": ["/static/js/content.js"], - "css": ["/static/css/app.css"] - }, - { - "matches": ["https://play.hbonow.com/*", "https://play.hbomax.com/*"], + "matches": [ + "https://*.hulu.com/*", + "https://*.netflix.com/*", + "https://*.amazon.com/*", + "https://*.disneyplus.com/*", + "https://*.youtube.com/*", + "https://play.hbonow.com/*", + "https://play.hbomax.com/*" + ], "run_at": "document_idle", "js": ["/static/js/content.js"], "css": ["/static/css/app.css"] diff --git a/app/public/popup.html b/app/public/popup.html index ddcc5ad..e480f75 100644 --- a/app/public/popup.html +++ b/app/public/popup.html @@ -1,54 +1,11 @@ - - + - - - - - Hulu - Netflix - Prime Video + Show tips + Give Feedback + Support Watch Party diff --git a/app/src/Api.js b/app/src/Api.js index 2977b0a..550cc7c 100644 --- a/app/src/Api.js +++ b/app/src/Api.js @@ -43,7 +43,7 @@ export const updateLocalData = (data) => { window.localStorage.setItem('WatchParty', JSON.stringify(Object.assign({}, LocalData(), data))); }; -export const emptyLocalData = () => window.localStorage.reject('WatchParty'); +export const emptyLocalData = () => window.localStorage.removeItem('WatchParty'); export const getUserUid = async () => new Promise((resolve, reject) => { diff --git a/app/src/Chat.js b/app/src/Chat.js index 9919e4c..b4800d9 100644 --- a/app/src/Chat.js +++ b/app/src/Chat.js @@ -459,7 +459,7 @@ export default class Chat extends Component { placeholder={this.state.gif ? 'Search something...' : 'Say something...'} helperText={ this.state.newMessage && !this.state.gif - ? 'Enter to send' + ? 'Enter to send / Shift+Enter for next line' : this.state.gif ? 'Click on gif to send' : null diff --git a/app/src/Create.js b/app/src/Create.js index c237bf9..dbf66e7 100644 --- a/app/src/Create.js +++ b/app/src/Create.js @@ -10,7 +10,12 @@ import { } from './Api'; import { goTo } from 'route-lite'; import Chat from './Chat'; -import { ChevronRight } from '@material-ui/icons'; +import { + ChevronRight, + InfoRounded, + ContactSupportRounded, + MonetizationOnRounded, +} from '@material-ui/icons'; const CONSTANTS = { USER_NAME_LENGTH: 12, @@ -207,6 +212,35 @@ export default class Create extends Component { {mode === 'create' ? 'Start Party' : 'Join Party'}