diff --git a/app/public/manifest.json b/app/public/manifest.json index f622b42..ff8951b 100644 --- a/app/public/manifest.json +++ b/app/public/manifest.json @@ -23,8 +23,7 @@ "https://tv.apple.com/*", "https://*.viki.com/*", "https://*.funimation.com/*", - "https://roosterteeth.com/*", - "https://vrv.co/*" + "https://*.roosterteeth.com/*" ], "content_scripts": [ { @@ -42,8 +41,7 @@ "https://tv.apple.com/*", "https://*.viki.com/*", "https://*.funimation.com/*", - "https://roosterteeth.com/*", - "https://vrv.co/*" + "https://*.roosterteeth.com/*" ], "run_at": "document_idle", "js": ["/static/js/content.js"], diff --git a/app/src/Api.js b/app/src/Api.js index 210d610..7ec7744 100644 --- a/app/src/Api.js +++ b/app/src/Api.js @@ -34,7 +34,6 @@ export const PLAYER_SOURCE = { VIKI: 'viki.', FUNIMATION: 'funimation.', ROOSTERTEETH: 'roosterteeth.', - VRV: 'vrv.', LOCAL: 'localhost', }; @@ -54,7 +53,6 @@ export const getPlayerSource = () => { if (HREF.includes(PLAYER_SOURCE.VIKI)) return PLAYER_SOURCE.VIKI; if (HREF.includes(PLAYER_SOURCE.FUNIMATION)) return PLAYER_SOURCE.FUNIMATION; if (HREF.includes(PLAYER_SOURCE.ROOSTERTEETH)) return PLAYER_SOURCE.ROOSTERTEETH; - if (HREF.includes(PLAYER_SOURCE.VRV)) return PLAYER_SOURCE.VRV; if (HREF.includes(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL; }; diff --git a/app/src/VideoListener.js b/app/src/VideoListener.js index ce05f9a..7878072 100644 --- a/app/src/VideoListener.js +++ b/app/src/VideoListener.js @@ -9,7 +9,7 @@ ALL CONTENT ON WATCH PARTY'S WEBSITE OR IN WATCH PARTY'S CHROME EXTENSION APP, U CITED ARE THE SOLE INTELECTUAL PROPERTY OF AYUSHYA AMITABH, AND MAY NOT BE COPIED, EDITED, OR REPRODUCED WITHOUT PERMISSION. ************************************************************************/ -import { PLAYER_STATUS, getPlayerSource, PLAYER_SOURCE, LocalData } from './Api'; +import { PLAYER_STATUS, getPlayerSource, PLAYER_SOURCE, LocalData} from './Api'; const templateListener = (video) => console.log('MISSING VIDEO LISTENER'); @@ -72,7 +72,6 @@ export default class VideoListener { switch (this.video.source) { case PLAYER_SOURCE.CRUNCHYROLL: case PLAYER_SOURCE.FUNIMATION: - case PLAYER_SOURCE.VRV: window.removeEventListener('watchParty', this.crunchyRollListener); break; default: @@ -162,16 +161,6 @@ export default class VideoListener { time: serverPlayer.time, }) ); - case PLAYER_SOURCE.VRV: - window.postMessage( - JSON.stringify({ - watchPartyDirection: 'TO_SCRIPT', - type: 'WATCH_PARTY_SEEK', - status: serverPlayer.status, - time: serverPlayer.time, - }) - ); - break; default: break; } @@ -190,8 +179,7 @@ export default class VideoListener { PLAYER_SOURCE.CRUNCHYROLL === this.video.source || PLAYER_SOURCE.PEACOCK === this.video.source || PLAYER_SOURCE.FUNIMATION === this.video.source || - PLAYER_SOURCE.ROOSTERTEETH === this.video.source || - PLAYER_SOURCE.VRV === this.video.source + PLAYER_SOURCE.ROOSTERTEETH === this.video.source ) { window.postMessage( JSON.stringify({ @@ -217,8 +205,7 @@ export default class VideoListener { PLAYER_SOURCE.CRUNCHYROLL === this.video.source || PLAYER_SOURCE.PEACOCK === this.video.source || PLAYER_SOURCE.FUNIMATION === this.video.source || - PLAYER_SOURCE.ROOSTERTEETH === this.video.source || - PLAYER_SOURCE.VRV === this.video.source + PLAYER_SOURCE.ROOSTERTEETH === this.video.source ) { window.postMessage( JSON.stringify({ @@ -242,7 +229,6 @@ export default class VideoListener { switch (this.video.source) { case PLAYER_SOURCE.CRUNCHYROLL: case PLAYER_SOURCE.FUNIMATION: - case PLAYER_SOURCE.VRV: window.addEventListener('watchParty', this.crunchyRollListener); break; default: @@ -357,12 +343,6 @@ export default class VideoListener { return roosterTeethShow === '' && roosterTeethEpisode === '' ? null : roosterTeethShow + '\n' + roosterTeethEpisode; - case PLAYER_SOURCE.VRV: - const vrvShowContainer = document.querySelector(nS.show); - const vrvEpisodeContainer = document.querySelector(nS.episode); - const vrvShow = vrvShowContainer ? vrvShowContainer.innerText : ''; - const vrvEpisode = vrvEpisodeContainer ? vrvEpisodeContainer.innerText : ''; - return vrvShow === '' && vrvEpisode === '' ? null : vrvShow + ' ' + vrvEpisode; default: break; } @@ -403,7 +383,6 @@ export default class VideoListener { switch (this.video.source) { case PLAYER_SOURCE.CRUNCHYROLL: case PLAYER_SOURCE.FUNIMATION: - case PLAYER_SOURCE.VRV: window.postMessage( JSON.stringify({ watchPartyDirection: 'TO_SCRIPT', @@ -771,38 +750,6 @@ export default class VideoListener { ); } break; - case PLAYER_SOURCE.VRV: - const vrvInject = `var sendToWatchPartyApp=function(pS,pT){var customWatchPartyEvent=new CustomEvent('watchParty',{detail:{watchPartyDirection:'TO_APP',type:'WATCH_PARTY_PLAYER_UPDATE',status:pS,time:pT}});window.dispatchEvent(customWatchPartyEvent)},watchPartyGetTimeAndSend=function(pS){const playerIframe=document.querySelector('${ - this.selectors[PLAYER_SOURCE.VRV] - }');if(playerIframe){const player=playerIframe.contentWindow.document.querySelector('video');if(player){sendToWatchPartyApp(pS,player.currentTime)}}},watchPartySendPlaying=function(){watchPartyGetTimeAndSend('PLAYING')},watchPartySendPaused=function(){watchPartyGetTimeAndSend('PAUSED')},watchPartyInteraction=function(e){const data=JSON.parse(e.data);const playerIframe=document.querySelector('${ - this.selectors[PLAYER_SOURCE.VRV] - }');if(playerIframe){const player=playerIframe.contentWindow.document.querySelector('video');if(player){if(data.watchPartyDirection==='TO_SCRIPT'){if(data.type==='WATCH_PARTY_ADD_LISTENERS'){player.addEventListener('playing',watchPartySendPlaying);player.addEventListener('pause',watchPartySendPaused)}else if(data.type==='WATCH_PARTY_SEEK'){const playerNode=player.parentNode;if(playerNode&&playerNode.player){playerNode.player.currentTime(data.time)}}else if(data.type==='WATCH_PARTY_STATUS'){if(data.status==='PAUSED')player.pause();if(data.status==='PLAYING')player.play()}}}}};window.addEventListener("message",watchPartyInteraction);`; - const vrvInjectScript = document.createElement('script'); - vrvInjectScript.text = vrvInject; - document.head.appendChild(vrvInjectScript); - const vrvIframe = document.querySelector(this.selectors[PLAYER_SOURCE.VRV]); - if (vrvIframe) { - this.firstTimeSync(vrvIframe); - } else { - setInterval( - this.video.element - ? null - : () => { - const vrvif = document.querySelector(this.selectors[PLAYER_SOURCE.VRV]); - if (vrvif) { - this.firstTimeSync(vrvif); - } - }, - 1000 - ); - } - break; - case PLAYER_SOURCE.LOCAL: - const localVideoElement = document.getElementsByTagName('video')[0]; - if (localVideoElement) { - this.firstTimeSync(localVideoElement); - } - break; default: break; } diff --git a/app/src/index.css b/app/src/index.css index d0d6ab9..d741461 100644 --- a/app/src/index.css +++ b/app/src/index.css @@ -278,10 +278,6 @@ body.roosterteeth.visible .party-content-wrapper textarea:focus { border-bottom: none !important; box-shadow: none !important; } -/* VRV STYLING */ -body.vrv.visible .header-content { - max-width: var(--body-width); -} #party-loading { position: absolute; diff --git a/app/src/index.js b/app/src/index.js index 8c85c7f..a062eb5 100644 --- a/app/src/index.js +++ b/app/src/index.js @@ -131,9 +131,6 @@ switch (getPlayerSource()) { case PLAYER_SOURCE.ROOSTERTEETH: document.body.classList.add('roosterteeth'); break; - case PLAYER_SOURCE.VRV: - document.body.classList.add('vrv'); - break; case PLAYER_SOURCE.LOCAL: document.body.classList.add('local'); break;