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();
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><ulclass="iconlist"><liclass="pdf"><ahref="#">Milk</a></li><liclass="text"><ahref="#">Eggs</a></li><liclass="htm"><ahref="#">Cheese</a></li><liclass="doc"><ahref="#">Vegetables</a></li><liclass="text"><ahref="#">Fruit</a></li></ul>
Post a Comment for "Create Greasemonkey Script To Remove Certain Html Lines When Found"