From 8a7cc75a035b58bcf12893132cc63e16f6069bff Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 14 Aug 2021 22:00:24 +0200 Subject: Hide distractions when Seamless controls are added Seamless controls can be added during the end credits of a series episode. When those controls are added, the "Back to Browse" button appears as well as the mouse cursor. A transparent promo background also appears. Hide the "Back to Browse" button and promo background in CSS. Add a new `seamless` module to handle hiding the mouse cursor. Listen for the addition of the `.SeamlessControls--container` element, which means Seamless controls were activated. At this point, force the cursor to be hidden. Show it again when the user moves the mouse. --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/index.ts') diff --git a/src/index.ts b/src/index.ts index 4d3a951..237d232 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Teddy Wing +// Copyright (c) 2020–2021 Teddy Wing // // This file is part of Immersive. // @@ -17,6 +17,7 @@ import fullscreen_credits from './fullscreen_credits'; import logger from './logger'; +import seamless from './seamless'; import styles from './styles'; import watch_credits from './watch_credits'; @@ -27,6 +28,7 @@ function main () { styles(); fullscreen_credits(); watch_credits(); + seamless(); } -- cgit v1.2.3