Search code examples
javascriptcssgoogle-chromegoogle-chrome-extensionbrowser-plugin

Can I write a chrome extension to change the CSS of a page or site as the page loads?


In GitHub, I cannot stand how the side menu is located on the right side when you are in a repository. It drives me nuts, so I want to script something that will change the float:right property on the side menu to float:left.

A buddy of mine suggested I write a chrome extension for this. Before I look into that, I wanted to get feedback on what options I have to accomplish this.


Solution

  • You could either use Greasemonkey (named Tampermonkey in Chrome) to add user scripts, or if the CSS element has an unique path to identify it, you can use Stylish to overwrite CSS properties.

    I recommend the latter. It is easy and will certainly work.