Opened 6 years ago

Last modified 5 years ago

#431 closed change

Remove special handling for the $sitekey option — at Version 4

Reported by: trev Assignee: greiner
Priority: P2 Milestone: Adblock-Plus-2.6.5-for-Firefox
Module: Core Keywords:
Cc: Blocked By:
Blocking: #406 Platform: Unknown
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

http://codereview.adblockplus.org/4559243822759936/

Description (last modified by trev)

Background

Currently the $sitekey option is handled separately from any other filter options. The background here is that it was originally meant to whitelist everything on particular websites - so I implemented this special solution in order to avoid impacting the performance negatively. In addition to requiring more code, distinguishing between individual requests isn't possible and only one filter is respected for each key.

What to change

Remove the special handling for sitekeys in lib/matcher.js - they should be handled in exactly the same way as the domain option. That means that the filters are matched by the pattern part first, other options are checked later. This means that the sitekey needs to be added as a parameter for Mather.matchesAny() and RegExpFilter.matches(). The latter can check sitekey matches trivially.

Change History (4)

comment:1 Changed 6 years ago by trev

  • Description modified (diff)

comment:2 Changed 6 years ago by fhd

  • Priority changed from P1 to P2

comment:3 Changed 6 years ago by greiner

  • Owner set to greiner

comment:4 Changed 6 years ago by greiner

  • Platform set to Unknown
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.