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

125
Views
Trying to select a dom item on a page built by React with JS console

Using the script with Tampermonkey (a user script manager), I am trying to select an HTML element after the page has been rendered. This is a live site that is not my own.

I inspected the source code and can see there is a "React developer tools" folder and a "webpack" folder.

It seems I am only able to select the elements I want when I select said HTML elements with the dev tools and then target it with javascript. I need a way to do this solely through script.

Here is the code I am using.

(function() {
    'use strict';
    // Your code here...
if (location.href === "https://annotate.appen.com/")
{
    function jobFunction() {
      let anchorSearch = () => {
        let theLink = document.querySelector("td > a");
        if (!theLink) {
          console.log("second check")
          location.reload(true);
        }
        else {
          return
        }
      };
      console.log("first check")

      function checkDom (){
        let tableDom =document.querySelector('td');
          if (tableDom) {
            console.log("Dom Loaded, starting check")
          anchorSearch()
          }
          else {
            console.log('checking dom..')
            setInterval(checkDom, 5000)
        }
      }
      checkDom()
    }
    jobFunction();

  }
})();
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!