Closed inickt closed 6 years ago
add missing semicolons on video.pause() as well as a URL check for containing twitch before double pausing - then its good to go
Why the specific check for Twitch? I haven't gone through all sites but it doesn't seem that unreasonable it could crop up somewhere else– and I don't really think it hurts.
not in love with executing async code when not needed but I suppose your right. Looks like async/await was introduced in chrome 55 which was about 2 years ago so thats something to keep in mind but in all likelihood browsers will be updated past that anyway
I don't think I needed to use async here, but there is also no need for that bock to be synchronous. Luckily the delay needed is incredibly small, so we could pull it out of the async, but the pausing can technically happen whenever.
Also I don't think we have to worry about 55 anymore: https://www.w3counter.com/globalstats.php
Dunno if I can clean this up any more but it works