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

391
Vistas
Uncaught ReferenceError: Audio is not defined in Chrome Extension JS Script

I'm trying to create a local script that loads a specific page, checks for contents and plays an audio if something is found but as soon as I load the extension in the dev mode it keeps saying "Uncaught ReferenceError: Audio is not defined"...

This is the code of the script:

chrome.tabs.create({ url: "URL"});
var snd = new Audio('https://www.soundjay.com/misc/sounds/bell-ringing-04.mp3');
var res = document.querySelector('[colspan="10"]');
if (res == null) {
 snd.play();
 chrome.tabs.create({ url: "URL"});
 chrome.tabs.getCurrent(function(tab) {
 chrome.tabs.remove(tab.id, function() { });
 });
}

Some explanations: the page I'm loading contains a list of to-do tasks. What I'm doing in the script is simply check if that list exists: if it does than there's no task, if it does not than the alert is played cause there's something to do (I know the logic is upside-down but blame it on the website creator xD).

Any suggestion?

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