A
A
Alexander2012-07-23 15:46:27
Greasemonkey
Alexander, 2012-07-23 15:46:27

How to kill background on search using GeraseMonkey?

Hell, the gray background #CCCCCC on forum.searchengines.ru/ makes the text unreadable.
I tried using GeraseMonkey to change the background color in CSS .alt1, .alt1Active to #FFFFFF - nothing happens, the background does not change. I tried several different methods that I found on the internet, I post the simplest of them. What am I doing wrong? Help me get it right :)
// ==UserScript==
// name searchengines
// name space forum.searchengines.ru/
// @description kills the nasty gray background on Search
// include forum.searchengines.ru/ *
// version 1
// ==/UserScript==
document.alt1.style.background = “#ffffff”;

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
ascending, 2012-07-23
@Alexx_ps

Well, if GreaseMonkey, then it's quite simple:

GM_addStyle(".alt1, .alt1Active, .thead { background-color: #fff; }");

A
Anatoly, 2012-07-23
@taliban

document.getElementsByClassName('.alt1')…

W
Wott, 2012-07-23
@Wott

classes have sequence and weight
try to assign to

.page .alt1, .page .alt1Active { 
background: #FFFFFF;
}

and JS in this case just takes and assigns a color to the element, ignoring all CSS rules

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question