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

388
Views
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
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!