aboutsummaryrefslogtreecommitdiffstats
path: root/src/watch_credits.ts
diff options
context:
space:
mode:
authorTeddy Wing2020-05-09 00:32:16 +0200
committerTeddy Wing2020-05-09 00:50:19 +0200
commit9eecf1c6be59ff3c04152390d7ce556e36965fd8 (patch)
tree2d6cec9c91a0585eca48847acfc729fbca7f1fd2 /src/watch_credits.ts
parent21afe4648732d2fc6b6fc0a92de3a0b0d7f91264 (diff)
downloadnetflix-immersive-9eecf1c6be59ff3c04152390d7ce556e36965fd8.tar.bz2
Add documentation comments
Diffstat (limited to 'src/watch_credits.ts')
-rw-r--r--src/watch_credits.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/watch_credits.ts b/src/watch_credits.ts
index c6e2c7f..f41844a 100644
--- a/src/watch_credits.ts
+++ b/src/watch_credits.ts
@@ -20,6 +20,7 @@ import logger from './logger';
import wait_element from './wait_element';
+// Remove the "Watch Credits" button.
function init_mutation_observer (controls_el) {
const observer = new MutationObserver(function(mutation_list) {
for (var i = 0; i < mutation_list.length; i++) {
@@ -41,6 +42,8 @@ function init_mutation_observer (controls_el) {
const pointer_event = new PointerEvent('pointerdown', { bubbles: true });
watch_credits_button.dispatchEvent(pointer_event);
+ // When playback controls return as a result of having pressed
+ // "Watch Credits", they become visible. Keep them hidden.
controls.hide();
return;
@@ -57,6 +60,7 @@ function init_mutation_observer (controls_el) {
);
}
+// Initialise the mutation observer when playback controls become available.
export default function init () {
wait_element('.PlayerControlsNeo__all-controls')
.then(function(controls_el) {