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

145
Views
Updating href does not change where the link takes me

I am building a chrome extension to update all of the hrefs in a page to call a phone number (phone_number) instead of link to a page (/phone/phone_number) with the phone number listed again... I'm testing right now by hard coding the phone number that will be click-to-called. Unfortunately, even after updating the href, the link still takes me to the original page "/phone/phone_number", and does not trigger the call alert dialog on chrome.

window.onload = async () => {
  await sleep(3000);
  var phone_blocks = Array.prototype.slice.call(document.getElementsByClassName("px-5 py-7 pearl td-n card flat"))

  phone_blocks.forEach(block => {
    block.href = "tel:8607817749"
  });

}
function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

As you can see below, the href is changed per the console, but when I click it, I'm directed to the page that the href originally linked to - not the phone-number. If I right click and "copy link address", then I receive "tel:+18607817749" in my clipboard. Why is clicking it taking me to the old link?

enter image description here

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!