Create Greasemonkey Script To Remove Certain HTML Lines When Found
I'm trying to make grease monkey script that could remove certain lines in html like this for example
Solution 1:
Try this:
$( ".doc" ).remove()
and here's answer for your exact example ( http://pl.tinypic.com/view.php?pic=1yl65u&s=8 ):
$('#actionList').empty();
Solution 2:
$('li:contains("Vegetables")').parent().remove();
OR
If you know class name before delete line then simply do like
$(".doc").parent().remove();
$('li:contains("Vegetables")').remove();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<ul class="iconlist">
<li class="pdf"><a href="#">Milk</a></li>
<li class="text"><a href="#">Eggs</a></li>
<li class="htm"><a href="#">Cheese</a></li>
<li class="doc"><a href="#">Vegetables</a></li>
<li class="text"><a href="#">Fruit</a></li>
</ul>
Post a Comment for "Create Greasemonkey Script To Remove Certain HTML Lines When Found"