Any way to block content with random or no ids?

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
cjsmall
Posts: 53
Joined: Mon Jan 05, 2009 5:54 pm

Any way to block content with random or no ids?

Post by cjsmall »

This has probably been discussed before, but I could not locate an appropriate thread.

I am encountering many websites that now generate undesirable content with randomly generated names. For example, here is one set of ids for an element on one page:

id: gbqfwabzip7
class: gbqfwax_item

This sort of thing is becoming very common. Using Element Hiding Helper, you can add this to the filter list, but the next time you access the page, similar content will gave a different unique identifier and will not be blocked. Has anyone come up with an approach to deal with this?

On a related note, there are sites that do not identify elements uniquely. For example, the website:

http://www.geekculture.com/joyoftech/

builds the entire page out of item class "Maintext" and a table where every element is a row (tr) or column (td), making it near impossible to select specific elements without knocking out many others. it seems as though any solution to one of these problems might apply to the other.

I don't see an obvious solution, but I wondered if anyone had come up with something creative. Thanks.
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Any way to block content with random or no ids?

Post by lewisje »

Remember, a hiding rule can be based on any CSS selector recognized by the browser; you can try opening the developer console and trying document.querySelectorAll(<selector>); where <selector> is any CSS selector, as a string.

For this specific case, I wonder whether geekculture.com##a.Maintext is still too broad.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
cjsmall
Posts: 53
Joined: Mon Jan 05, 2009 5:54 pm

Re: Any way to block content with random or no ids?

Post by cjsmall »

Thanks lewisje. I'll take a closer look using the console and see what I can come up with.
Locked