aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.ts
blob: ea0e54103269030b3c8dfe7135230dd71cbd99f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export default function with_player (): Promise<HTMLElement> {
	return new Promise(function(resolve) {
		const interval = setInterval(
			function() {
				const player = document.querySelector('.NFPlayer.nf-player-container');

				if (player) {
					clearInterval(interval);

					resolve(player);
				}
			},
			1000
		);
	});
}