I'm creating a web plugin for youtube, however im facing some issues like Suppose we are on youtube home page, now how would i know if some new video has been loaded in our home page(like whenever we open the youtube page first 24 videos are loaded and then as we scroll down more 24 are loaded and so on..) and i want to detect this change so i can do my analysis accordingly.
Also im using mutationobserver and i've tried with document.location.href, however this only gives the root url i.e https://www.youtube.com/ and using this i cannot detect any change in content.