How can I create a beginner-friendly YouTube theme extension?

0
2
Asked By MellowPine42 On

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

Answered By QuietMaple88 On

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.

MellowPine42 -

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

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.