I am building a Firefox add-on that parses the URL when YouTube loads a video page (e.g. https://www.youtube.com/watch?v=6tOQsswD4Tc). Using Firefox's Add-on api for Tabs, I can't catch the event when the video page is finished loading. This might be due to YT's new asynchronous loading. Because if I hit F5, I can capture the event. I am using this code:
tabs.on("ready", function(tab) {
if(tab.url.search(/youtube\.com\/watch\?v=/)!=-1){
// do stuff
}
});
I tried changing it to 'ready', 'load', 'pageshow' but nothing seems to work. How can I capture the page-load event?