Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

210
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda