Skip to content

Commit

Permalink
Remove experimemental support for HBO (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
portovep authored Apr 12, 2022
1 parent 42c11db commit 4dd6bab
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
6 changes: 0 additions & 6 deletions chrome_extension_poc/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ chrome.runtime.onInstalled.addListener(function () {
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { hostEquals: "www.youtube.com", pathContains: "watch" },
}),
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { hostEquals: "play.hbomax.com", pathContains: "feature" },
}),
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { hostEquals: "play.hbomax.com", pathContains: "episode" },
}),
],
actions: [new chrome.declarativeContent.ShowPageAction()],
},
Expand Down
6 changes: 1 addition & 5 deletions chrome_extension_poc/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@
},
"content_scripts": [
{
"matches": [
"https://www.netflix.com/*",
"https://www.youtube.com/*",
"https://play.hbomax.com/*"
],
"matches": ["https://www.netflix.com/*", "https://www.youtube.com/*"],
"js": [
"lib/peerjs.min.js",
"lib/materialize.min.js",
Expand Down
3 changes: 1 addition & 2 deletions chrome_extension_poc/videoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,10 @@ class VideoPlayer {
*/
static locateVideo(document, hostname) {
const isNetflix = hostname.includes("netflix");
const isHBOMax = hostname.includes("hbomax");
const isYoutube = hostname.includes("youtube");

const findVideoElement = () => {
if (isNetflix || isHBOMax) {
if (isNetflix) {
return document.getElementsByTagName("video")[0];
} else if (isYoutube) {
for (let video of document.getElementsByTagName("video")) {
Expand Down

0 comments on commit 4dd6bab

Please sign in to comment.