I recently learned about browser extensions that customize YouTube and would like to build one myself. I'm completely new to coding and have created files named manifest.json, script.js, and style.css, but I'm not sure what code belongs in each file. I'd like to add images, change YouTube's background colors, and experiment with different fonts. Is this possible, and what should I learn or set up first?
1 Answer
YouTube uses CSS variables for many of its colors, so your stylesheet can override some of them by targeting elements such as html and body. Fonts usually require targeting the classes or elements used by YouTube’s text, though those selectors can change when the site is updated. CSS can display background images, but if you want to create new elements or insert image tags into the page, use a content script in the manifest and add them with JavaScript.

Got it, thanks! I’ll start with CSS changes and learn how content scripts can add elements afterward.