Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

105
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda