diff options
| author | Teddy Wing | 2020-05-08 17:37:14 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2020-05-08 17:37:14 +0200 | 
| commit | fa02ff6374f715c9f754ce28401c8a81846ca52a (patch) | |
| tree | 640025aa8167f92b4062d96e51c7d1cf97563348 /src | |
| parent | 6fe95288e9a929dfaf94fb67969ebcb6b759e28e (diff) | |
| download | netflix-immersive-fa02ff6374f715c9f754ce28401c8a81846ca52a.tar.bz2 | |
Use `const` variable declarations where possible
Diffstat (limited to 'src')
| -rw-r--r-- | src/fullscreen_credits.ts | 6 | ||||
| -rw-r--r-- | src/styles.ts | 4 | ||||
| -rw-r--r-- | src/watch_credits.ts | 10 | 
3 files changed, 10 insertions, 10 deletions
| diff --git a/src/fullscreen_credits.ts b/src/fullscreen_credits.ts index edd8a8f..8011657 100644 --- a/src/fullscreen_credits.ts +++ b/src/fullscreen_credits.ts @@ -3,10 +3,10 @@ import wait_element from './wait_element';  function init_mutation_observer (player) { -	var observer = new MutationObserver(function(mutation_list) { +	const observer = new MutationObserver(function(mutation_list) {  		for (var i = 0; i < mutation_list.length; i++) { -			var mutation = mutation_list[i]; -			var player = mutation.target as HTMLElement; +			const mutation = mutation_list[i]; +			const player = mutation.target as HTMLElement;  			if (player.classList.contains('postplay')) {  				player.classList.remove('postplay'); diff --git a/src/styles.ts b/src/styles.ts index e1e0c28..9d44e45 100644 --- a/src/styles.ts +++ b/src/styles.ts @@ -1,9 +1,9 @@  export function styles () { -	var style = document.createElement('style'); +	const style = document.createElement('style');  	document.head.appendChild(style); -	var stylesheet = style.sheet as CSSStyleSheet; +	const stylesheet = style.sheet as CSSStyleSheet;  	stylesheet.insertRule(  		'.OriginalsPostPlay-BackgroundTrailer .BackToBrowse { visibility: hidden; }', diff --git a/src/watch_credits.ts b/src/watch_credits.ts index 99c67ca..ceba425 100644 --- a/src/watch_credits.ts +++ b/src/watch_credits.ts @@ -4,19 +4,19 @@ import wait_element from './wait_element';  function init_mutation_observer (controls) { -	var observer = new MutationObserver(function(mutation_list) { +	const observer = new MutationObserver(function(mutation_list) {  		for (var i = 0; i < mutation_list.length; i++) { -			var mutation = mutation_list[i]; -			var element = mutation.target as HTMLElement; +			const mutation = mutation_list[i]; +			const element = mutation.target as HTMLElement; -			var watch_credits_button: HTMLButtonElement = element.querySelector( +			const watch_credits_button: HTMLButtonElement = element.querySelector(  				'[data-uia="watch-credits-seamless-button"]'  			);  			if (watch_credits_button) {  				logger.debug('found Watch Credits button', watch_credits_button); -				var pointer_event = new PointerEvent('pointerdown', { bubbles: true }); +				const pointer_event = new PointerEvent('pointerdown', { bubbles: true });  				watch_credits_button.dispatchEvent(pointer_event);  				controls.hide(); | 
