v1.4.1-beta/HBO Fixes
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "watch-party-crx",
|
"name": "watch-party-crx",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@giphy/js-fetch-api": "^1.5.8",
|
"@giphy/js-fetch-api": "^1.5.8",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Watch Party",
|
"name": "Watch Party",
|
||||||
"short_name": "WP",
|
"short_name": "WP",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "Watch streamed content together.",
|
"description": "Watch streamed content together.",
|
||||||
"background": {
|
"background": {
|
||||||
"page": "popup.html"
|
"page": "popup.html"
|
||||||
|
|||||||
+30
-1
@@ -6,7 +6,7 @@ import Loading from './Loading';
|
|||||||
import firebase from 'firebase/app';
|
import firebase from 'firebase/app';
|
||||||
import 'firebase/firestore';
|
import 'firebase/firestore';
|
||||||
import Inactive from './Inactive';
|
import Inactive from './Inactive';
|
||||||
import { getUserUid } from './Api';
|
import { getUserUid, getPlayerSource, PLAYER_SOURCE } from './Api';
|
||||||
|
|
||||||
const APP_VERSION = '1.4.0';
|
const APP_VERSION = '1.4.0';
|
||||||
|
|
||||||
@@ -22,6 +22,15 @@ const darkTheme = createMuiTheme({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function hboClickFix(ev) {
|
||||||
|
if (document.querySelector('body.visible')) {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
ev.stopImmediatePropagation();
|
||||||
|
console.log('cc');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Routes = (props) => (
|
const Routes = (props) => (
|
||||||
<Router>
|
<Router>
|
||||||
<Create {...props} />
|
<Create {...props} />
|
||||||
@@ -40,6 +49,8 @@ const App = () => {
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [notification, setNotification] = useState(closedNotification);
|
const [notification, setNotification] = useState(closedNotification);
|
||||||
|
|
||||||
|
let hasAttached = false;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
getUserUid();
|
getUserUid();
|
||||||
@@ -58,6 +69,24 @@ const App = () => {
|
|||||||
if (visible) {
|
if (visible) {
|
||||||
document.body.classList.add('visible');
|
document.body.classList.add('visible');
|
||||||
PartyRoutesWrapper && PartyRoutesWrapper.classList.add('visible');
|
PartyRoutesWrapper && PartyRoutesWrapper.classList.add('visible');
|
||||||
|
if (
|
||||||
|
!hasAttached &&
|
||||||
|
(getPlayerSource() === PLAYER_SOURCE.HBOMAX || getPlayerSource() === PLAYER_SOURCE.HBONOW)
|
||||||
|
) {
|
||||||
|
document.addEventListener(
|
||||||
|
'mousedown',
|
||||||
|
function (ev) {
|
||||||
|
if (document.body.querySelector('body.visible')) {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
ev.stopImmediatePropagation();
|
||||||
|
console.log('cc');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ capture: true }
|
||||||
|
);
|
||||||
|
hasAttached = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
document.body.classList.remove('visible');
|
document.body.classList.remove('visible');
|
||||||
PartyRoutesWrapper && PartyRoutesWrapper.classList.remove('visible');
|
PartyRoutesWrapper && PartyRoutesWrapper.classList.remove('visible');
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ switch (getPlayerSource()) {
|
|||||||
break;
|
break;
|
||||||
case PLAYER_SOURCE.HBONOW:
|
case PLAYER_SOURCE.HBONOW:
|
||||||
case PLAYER_SOURCE.HBOMAX:
|
case PLAYER_SOURCE.HBOMAX:
|
||||||
|
const hboClickInject = `var hboInputFix=function(ev){if(ev.target.tagName==='INPUT'||ev.target.tagName==='TEXTAREA'){ev.target.focus();}ev.stopImmediatePropagation();ev.stopPropagation();};document.addEventListener('keydown',hboInputFix,{capture:true});var hboClickFix=function(ev){if(document.querySelector('body.visible')){if(ev.clientX > window.innerWidth - 400){if(ev.target.tagName==='INPUT'||ev.target.tagName==='TEXTAREA'){ev.target.focus();}ev.preventDefault();ev.stopPropagation();ev.stopImmediatePropagation();}}};document.addEventListener("mousedown",hboClickFix,{capture:true});`;
|
||||||
|
const hboClickInjectScript = document.createElement('script');
|
||||||
|
hboClickInjectScript.text = hboClickInject;
|
||||||
|
document.head.appendChild(hboClickInjectScript);
|
||||||
document.body.classList.add('hbo');
|
document.body.classList.add('hbo');
|
||||||
break;
|
break;
|
||||||
case PLAYER_SOURCE.LOCAL:
|
case PLAYER_SOURCE.LOCAL:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "watch-party-api",
|
"name": "watch-party-api",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "Cloud Functions for Watch Party",
|
"description": "Cloud Functions for Watch Party",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "watch-party",
|
"name": "watch-party",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "Watch Party",
|
"description": "Watch Party",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "firebase emulators:start",
|
"start": "firebase emulators:start",
|
||||||
|
|||||||
Reference in New Issue
Block a user