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

272
Views
remove ahref tag served from external java script

I have java script widged which also serves advertisement logo and link. I'm trying to remove the link. Tried the following script code:

<script>
const element = document.querySelector('#apps-google-reviews-1db34d2f-5a02-5eb0-a222-cec57773ac19 > div > a');
element.remove();
</script>

This is working in the browser's console but when I add it as a script in the HTML there is the following error in the console:

Uncaught TypeError: Cannot read properties of null (reading 'remove')

Basicaly the selector didn't catch the element.

about 4 years ago · Santiago Trujillo
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!