chazapp / adblacker

A browser extension that detects ads on video streams and blacks them out
The Unlicense
0 stars 0 forks source link

Use a MutationObserver instead of a polling loop #3

Open chazapp opened 1 year ago

chazapp commented 1 year ago

The code currently checks every 1s if the ad display timer is visible. It would be best if the application was ran only when the display ad timer appears. Use a MutationObserver on the div containing the video player to catch such event and run the application only then.