precise content filtering

lipbone

Registered
with css and safari, you can create a file which targets and eliminates specific chunks of data, like images of a certain size, images from a certain destination, etc.

my question is this, can you have an entire table removed if it contains a specific word phrase?
 
CSS only deals with styling of content, not what you're describing above. To remove items from a page with CSS, you have to manually encode a display:none property to a page element. If you're going to do that, you might as well not include the 'item' you don't want displayed in the file to begin with.

Sure you're not thinking of a scripting language like PHP? What you're asking to do would require some kind of parsing to happen with selectors based on criteria.
 
i'm talking about simple browsing. not a page i have control over.

right now, i have a css script that gets rid of the ads on most pages i visit. i'd also like to be able to filter out specific news items form popular newsites. hence my curiosity regarding the strength of css.
 
The only way CSS would work in this manner would be if you setup a
custom sheet that applied a display:none property to a specific element.
Meaning, if EVERY site used the same ID or CLASS for a news box ( div
id="news" or div class="news" or table class="news" etc.), then you
could make a stylesheet that said:

Code:
#news, .news {
     display: none;
     }

The above CSS (also attached to message, remove .txt from name) will
remove ANY element that has an ID or CLASS of "news" applied to it.
Problem is you'd have to be specific and the element (DIV, TABLE, etc.)
would have to have an ID or CLASS applied which is exactly what your
rules states. It will not remove an element based on a "keyword" that
might be contained within that element. For instance, 'Samarra' based on
the screenshots below.

So, if you applied this stylesheet through the Safari preferences (Advanced
tab) and went to YAHOO!'s main page (http://www.yahoo.com),
you'd see that the table with an ID of news is missing.


Without the CSS:
without.jpg



With the CSS:
with.jpg
 

Attachments

  • nonews.css.txt
    33 bytes · Views: 0
Back
Top