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

254
Views
How can I change a website text using chrome extension?

I am trying to change some text on a website. When I try to use innerText, nothing changes. This is the HTML of the text I want to change: <div class="styles__tokenBalanceText___2eYY7-camelCase">742</div>

Here is my manifest:

{
    "manifest_version": 3,
    "name": "test",
    "version": "1.0.0",
    "content_scripts": [
        {
            "matches": ["<all_urls>"],
            "all_frames": true,
            "js": ["Content.js"]

        }
    ],
    "permissions": [
        "activeTab"
    ]
}

And here is my Content.js:

const elements = document.getElementsByClassName('<div class="styles__tokenBalanceText___2eYY7-camelCase">742</div>')
for (let i = 0; i < elements.length; i++) {
    elements[i].innerText = "123";

}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use Tamper Monkey to run custom JavaScript on any specific website or page.

You just need to write the JavaScript code to achieve what you desire.

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!