Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
met committed Nov 21, 2021
2 parents 0046a57 + 7b1af4c commit ced8122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions dist/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ scriptElem.text = `
}, false);
const panelElem = document.createElement('div');
panelElem.style.cssText = 'position: absolute; z-index: 1000; top: 0; right: 0; font-size: 16px; color: white';
panelElem.style.cssText = 'position: absolute; z-index: 1000; top: 0; right: 0; font-size: 16px; color: white; pointer-events: auto';
panelElem.appendChild(toggleDisplayButtonElem);
panelElem.appendChild(selectElem);
panelElem.appendChild(downloadButtonElem);
Expand All @@ -322,7 +322,7 @@ scriptElem.text = `
const containerElem = document.createElement('div');
containerElem.id = SUBS_LIST_ELEM_ID;
containerElem.style.cssText = 'width: 100%; height: 100%; position: absolute; top: 0; right: 0; bottom: 0; left: 0';
containerElem.style.cssText = 'width: 100%; height: 100%; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none';
containerElem.appendChild(panelElem);
document.body.appendChild(containerElem);
Expand Down Expand Up @@ -380,10 +380,8 @@ scriptElem.text = `
}, false);
*/
// Appending this to the player rather than the document fixes some issues:
// 1) Clicking on subtitle text doesn't take focus (keyboard events) away from player
// 2) Hover on subtitle prevents the "sleep" title screen from coming up, which is nice
const playerElem = document.querySelector('.NFPlayer');
// Appending this to the player rather than the document changes details of behavior.
const playerElem = document.querySelector('.watch-video');
if (!playerElem) {
throw new Error("Couldn't find player element to append subtitles to");
}
Expand Down Expand Up @@ -510,9 +508,9 @@ scriptElem.text = `
// Poll periodically to see if current movie has changed
setInterval(function() {
let videoId;
const videoContainerElem = document.querySelector('.VideoContainer');
if (videoContainerElem) {
const dsetIdStr = videoContainerElem.dataset.videoid;
const videoIdElem = document.querySelector('*[data-videoid]');
if (videoIdElem) {
const dsetIdStr = videoIdElem.dataset.videoid;
if (dsetIdStr) {
videoId = +dsetIdStr;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Subfilter for Netflix",
"description" : "Watch your favourite series on Netflix with filtered subtitles and improve foreign language at the same time.",
"version": "0.5.0",
"version": "0.5.1",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
Expand Down

0 comments on commit ced8122

Please sign in to comment.