This is AdBlock's old support site. It is available for archival purposes only. To create a new discussion, or to visit the up-to-date knowledge base, please visit help.getadblock.com

RegEx advanced option

Rhody's Avatar

Rhody

11 Nov, 2014 06:58 PM

Hello guys,
I was wondering whether a RegEx advanced option could be added for those sites that have random generated IDs in some HTML elements.
Regards.

  1. 1 Posted by Nikolai on 12 Nov, 2014 07:05 PM

    Nikolai's Avatar

    +1

    for instance:
    http://www.vg.no/sport/sjakk/sjakkekspert-noe-er-galt-med-det-menta...

    random generated tags and class for the "anti-adblocktisement"

  2. Support Staff 2 Posted by Brent on 17 Nov, 2014 04:21 PM

    Brent's Avatar

    The www.vg.no site has an interesting approach to displaying content.

    However, AdBlock does support using RegEx's for blocking content. However, in this case we're limited to hiding the content, since it's part of the HTML document (the DOM). You could use the following custom filters to hide most of the content.

    vg.no##button[data-stats-string="Adblock::OpenPopup"]
    vg.no##p[class="t1"]
    vg.no##p[class="t2"]

    Enter the above custom rules by clicking the AdBlock icon, selecting Options page, then the Custom tab.

    On the Custom tab, click the 'edit' button, copy and paste the above rules, then click 'save'. Then open a new tab, and go to the www.vg.no web site. Most of the text and the button should be hidden. Hope this helps.

  3. 3 Posted by joachim on 01 Dec, 2014 10:26 PM

    joachim's Avatar

    I removed most of them (except the left column) with these;

    vg.no##button[data-stats-string="Adblock::OpenPopup"]
    vg.no##p[class="t1"]
    vg.no##p[class="t2"]
    vg.no##*[style="right: auto; left: auto; position: relative; width: 100%; height: 150px; margin-top: -1px; background-image: none;"]
    vg.no##*[style="right: -180px; left: auto;"]
    

    The problem with the left column is that it doesn't contain any style element (or anything else we can identify it with).

    The entire CSS for the anti-adblock is contained within a <style> (without any type="text/css"). If we could filter out any <style> that doesn't contain type="text/css", we'd be home-free. However, it doesn't seem like AdBlock supports this? Or?

  4. Support Staff 4 Posted by Brent on 04 Dec, 2014 05:30 PM

    Brent's Avatar

    closing discussion

  5. Brent closed this discussion on 04 Dec, 2014 05:30 PM.

Discussions are closed to public comments.
If you need help with AdBlock please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac