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

128
Views
Chrome Extension TypeError

I want to add a button red highlighted place on YouTube. But it doesn't work.

manifest.json

{
  "name": "Example",
  "version": "0.0",
  "manifest_version": 2,
  "content_scripts": [
    {
      "js": ["content.js"],
      "matches": ["<all_urls>"],
      "css": ["style.css"]
    }],
  "browser_action": {
    "default_popup": "addon_menu.html",
    "default_title": "Example"
  }
} 

content.js

console.log("Example is on!");


var  sttndiv = document.createElement("div");
var sttnbtn = document.createElement("button");
sttndiv.appendChild(sttnbtn);
document.getElementById("buttons").getElementsByClassName("yt-live-chat-message-input-renderer")[0].appendChild(sttndiv)[0];

Uncaught TypeError: Cannot read properties of undefined (reading 'appendChild')

enter image description here

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

0

By the error and common sense, you can see that sttndiv is undefined, this could be because there's a double space in front of it.

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!