aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/controls.ts21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/controls.ts b/src/controls.ts
index ad8f47c..5cff2d1 100644
--- a/src/controls.ts
+++ b/src/controls.ts
@@ -1,22 +1,21 @@
import logger from './logger';
-import wait_element from './wait_element';
const controls = {
hide: function() {
logger.debug('hide():', 'Hiding controls');
- wait_element('.PlayerControlsNeo__layout.PlayerControlsNeo__layout--active')
- .then(function(controls) {
- logger.debug('hide():', 'Controls:', controls);
+ const controls_el = document.querySelector(
+ '.PlayerControlsNeo__layout.PlayerControlsNeo__layout--active'
+ );
+ logger.debug('hide():', 'Controls:', controls_el);
- controls
- .classList
- .replace(
- 'PlayerControlsNeo__layout--active',
- 'PlayerControlsNeo__layout--inactive'
- );
- });
+ controls_el
+ .classList
+ .replace(
+ 'PlayerControlsNeo__layout--active',
+ 'PlayerControlsNeo__layout--inactive'
+ );
}
};