First Commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Netflix from './Netflix';
|
||||
import firebase from 'firebase/app';
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: 'AIzaSyCJLuYpzXLDRmu2ttzFuSGmYcpFxqToWFU',
|
||||
authDomain: 'watch-party-crx.firebaseapp.com',
|
||||
databaseURL: 'https://watch-party-crx.firebaseio.com',
|
||||
projectId: 'watch-party-crx',
|
||||
storageBucket: 'watch-party-crx.appspot.com',
|
||||
messagingSenderId: '712242707190',
|
||||
appId: '1:712242707190:web:65fa7f772e30da364b0ad7',
|
||||
measurementId: 'G-EZS4PEVG4T',
|
||||
};
|
||||
|
||||
firebase.initializeApp(firebaseConfig);
|
||||
|
||||
const PartyWrapper = document.createElement('div');
|
||||
PartyWrapper.id = 'party_wrapper';
|
||||
document.body.appendChild(PartyWrapper);
|
||||
|
||||
if (window.location.href.startsWith('https://www.hulu.com')) {
|
||||
} else if (window.location.href.startsWith('https://www.netflix.com')) {
|
||||
PartyWrapper.classList.add('netflix');
|
||||
document.body.classList.add('netflix');
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<Netflix />
|
||||
</React.StrictMode>,
|
||||
PartyWrapper
|
||||
);
|
||||
} else if (window.location.href.includes('amazon.com')) {
|
||||
} else {
|
||||
ReactDOM.render(<div>Watch Party not supported on this site</div>, PartyWrapper);
|
||||
}
|
||||
Reference in New Issue
Block a user