Manual filtering rules syntax is ok?

Discussion in 'Custom Filters' started by Zyxel, Dec 2, 2017.

  1. Zyxel

    Zyxel New Member

    Joined:
    Dec 22, 2015
    Messages:
    41
  2. Blaz

    Blaz Moderator & Translator Staff Member Moderator

    Joined:
    Dec 21, 2014
    Messages:
    9,757
    Not all rules are supported in AdGuard which uBlock supports.
     
  3. Zyxel

    Zyxel New Member

    Joined:
    Dec 22, 2015
    Messages:
    41
    Ok but What happens if the rules are wrong? do they not work or do they affect the whole application?
     
  4. Boo Berry

    Boo Berry Moderator + Beta Tester Moderator

    Joined:
    May 30, 2012
    Messages:
    4,066
    uBlock Origin has its own extended syntax for some filters. AdGuard also has its own extended syntax too. But, in the case of trying to use uBO extended syntax filters in AG, they won't work. It's probably likely that the rules that use uBO's extended syntax are treated as invalid and simply ignored in AG.

    Here's an example of a filter from uBlock's filter which AG doesn't support the syntax of;
    Code:
    forbes.com##script:inject(forbes-defuser.js)
    It's worth noting that uBlock Origin also doesn't support all of AdGuard's extended syntax for filters. For example, I don't think uBO supports $replace rules. Here's an example of a filter from AG's Annoyances filter which I don't believe is supported in uBO;
    Code:
    azaku-anime.com#%#AG_onLoad(function() { document.body.innerHTML = document.body.innerHTML.replace(/autoPlay=1/g, 'autoPlay=0'); });
     
    Zyxel likes this.
  5. Zyxel

    Zyxel New Member

    Joined:
    Dec 22, 2015
    Messages:
    41
    So even if the syntax is not exact the rules are imported I thought the filters with incorrect syntaxes were not imported because I did not find any malfunctions using uBlock-filters