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

103
Views
How to display text from any webstie to the chrome extension

i am looking to fetch the value of time from the id=time in background

and have that value displayed in place of tmee in the html shared.

if anyone can help i am working on a chrome extension.

when i click on the chrome extension it fetches a string in time format from a link in background and displays it if anyone can help? without using any external library Thank you

{

"manifest_version": 2,
"name": "whatever",
"description": "he he",
"version": "1.0.1",

"browser_action":{
"default_icon": "/images/icon.png",
"default_popup": "hehe.html"
},
"content_scripts": [ {
    "matches": ["https://www.utctime.net/ist-indian-time-now"],
    "js": ["hehe.js"]
}],
"background": {
    "scripts": ["hehe.js"],
    "persistent": false
  }
}

 getTime = () =>{
  time = document.getElementById("time").innerHTML //this element from the utc website
  sessionStorage .setItem('das2', time);
  return time
};


document.getElementById("tmee").innerHTML = getTime();//not working
document.getElementById("tmee").innerHTML 
 =sessionStorage.getItem('das2');//not working
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="hehe.css">
    <title>Whatever</title>
</head>
<body>
    <div class="container">
        <p>Time Counter : 
            <input id="h" type="number" max ="9" min="0" value="0" class="time">
            <input id="m" type="number" max ="60" min="0" value="0" class="time">    
            <input id="s" type="number" max ="60" min="0" value="0" class="time">



        </p>
        <p>Completion Percentage: <a id="time1"> b </a> </p>
        <p>Remaining minutes: <a id="tmee"> b </a></p>
        <p>Position: a</p>

    </div> 

    <script src="hehe.js"> </script>
    
     </body>
</html>

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!