I'm trying to write a small script for Greasemonkey, but it does not work, because I have little experience.
It is necessary to replace all properties CSS with a value (background: #fff;) on (background: #e8e8e8;).
I'm trying to write a small script for Greasemonkey, but it does not work, because I have little experience.
It is necessary to replace all properties CSS with a value (background: #fff;) on (background: #e8e8e8;).
Share Improve this question edited Aug 31, 2017 at 16:06 Vova Dima asked Aug 31, 2017 at 11:14 Vova DimaVova Dima 111 silver badge2 bronze badges 1- 2 To change CSS you use Stylish instead. – user5734311 Commented Aug 31, 2017 at 11:16
2 Answers
Reset to default 4// ==UserScript==
// @name Background color change
// @namespace https://website here
// @description Changes the background color
// @version 1
// @grant none
// ==/UserScript==
document.body.style.background = "white";
Simply add,
GM_addStyle("body { background-color: #fff !
important; }");
Important may not be needed.