- Mar 22, 2013
- 8,712
- 10,279
I hope I'm posting in the right section.
So I need to make Greasemonkey hide an image.
I've already set it to take effect on the page I want it to hide an image on, but I can't get a code to work to actually hide the image.
This is the image's HTML code:
So I know this code works:
I know that the part ".css('background-image')...." is what defines what needs to be hidden, but how do I put that image above there so that it'll work??
Note: The image above (in the first HTML code) is NOT a background-image, that's why my solution doesn't work as it is.
So I need to make Greasemonkey hide an image.
I've already set it to take effect on the page I want it to hide an image on, but I can't get a code to work to actually hide the image.
This is the image's HTML code:
HTML:
<img src="http://www.somesite.org/img/icon/something.png" alt="one" title="two" height="18px" width="50px">
So I know this code works:
HTML:
$('a').each(function(){
if($(this).css('background-image')=='url("http://www.something.org/img/icon/something.png")'){
$(this).parent().remove();
}
});
I know that the part ".css('background-image')...." is what defines what needs to be hidden, but how do I put that image above there so that it'll work??
Note: The image above (in the first HTML code) is NOT a background-image, that's why my solution doesn't work as it is.
Last edited: