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

114
Views
Search and replace data-reactid

I am trying to look for data-reactid value and replace it with another value.

Here is the code:

Book a Room.

trying to use the code to replace ".0.2.2" with ".0.2.3"

(function () {
    var link = document.querySelectorAll('a[data-reactid*=".0.2.2"]') //change example.com to any domain you want to target
    var searchString = ".0.2.2" //the string to be searched forEach
    var replacementString = ".0.2.3" //the replacement for the searched string 
    
    links.forEach(function(link){
        var original = link.getAttribute("data-reactid");
        var replace = original.replace(searchString,replacementString)
        link.setAttribute("data-reactid",replace)
    })
})();
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just change this

var link = document.querySelectorAll('a[data-reactid*=".0.2.2"]')

to this

var links = document.querySelectorAll('a[data-reactid*=".0.2.2"]')

But keep in mind that you should not change the attributes set by React itself

about 4 years ago · Juan Pablo Isaza Report
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!