L
L
Locket2020-12-15 21:15:52
Google Chrome
Locket, 2020-12-15 21:15:52

Can I add my styles to someone else's site?

I saw extensions in the chrom store, for example, for VK with the ability to replace the background with any picture, animated wallpaper or dark theme. So, does this work by replacing the style files, or does it change directly in the file when the page loads? The whole thing can be done by yourself limited to HTML, CSS, JS? I became interested in all this booze, scoured Google and didn’t really find any information, only creating an extension for Google itself.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fedor Vlasenko, 2020-12-15
@Locket

var link = document.createElement("link");
link.rel = "stylesheet";
link.href = "YouHref";
document.head.appendChild(link);

specifying your YouHref the address of the location of the css file you will insert styles

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question