Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
How to detect a youtube page has changed on an extension?

I'm developing an extension where I display some content on the sidebar based on specific youtube videos. I have these checks

  // get message on tab change
  browser.tabs.onActivated.addListener(function (activeInfo) {
    browser.tabs.get(activeInfo.tabId, function (tab) {
      GetInitialInfo(tab);
    });
  });
  // get message on page load
  browser.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
    if (changeInfo.status == "complete") {
      GetInitialInfo(tab);
    }
  });
  // // on window load
  window.onload = function () {
    browser.tabs.query({ active: true, currentWindow: true }, function (tabs) {
      GetInitialInfo(tabs[0]);
    });
  };

But none of them seem to detect when the youtube video changes. (The ajax bit).

I want GetInitialInfo() to run on: tab change, page change, youtube video change.

I think it works on tab change and page change (I've tested this for so long I'm no longer sure) But because youtube video pages change ajax style (or however) I don't know how to detect that.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!