TODO 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. - elementhiding: reverse exception rule are not supported (per domain).
  2. - block rule: exception rules are not supported: these are also abused sometimes
  3. to whitelist certain sites.
  4. - simplify match, there are only a few rules with multiple *.
  5. - loadrules: return struct rules* ?
  6. on error free rules.
  7. - optimization: for simple patterns use: strstr, strcasestr, strcmp, strcasemp
  8. - combine rules in groups: display: none: display: initial, saves memory:
  9. rule1,rule2 { display: none; } vs rule 1{...}rule2{...}
  10. - checkrequest -> allowrequest.
  11. - add test-case for global exception rules (no domains), see globalcss init code.
  12. also support inverse element hide rule: "~example.com##div.textad".
  13. - support domain name anchor separately: "||".
  14. - test blocking websocket connections in surf.
  15. - skip protocol part when matching for now, (later add support for websockets).
  16. - for f->matchbegin, matchend etc: make sure to match domain properly, check part of
  17. domain (subdomain).
  18. - optimize towupper for fnmatch? check < 128, see musl optimization.
  19. - fix blocking of : ||ads.somesite.com^
  20. matchbegin and matchend rules are wrong.
  21. - fix tweakers.net popup / rule.
  22. this is in an exception rule...
  23. make sure exception rules are always below in the list? modify awk script?
  24. - preprocess pattern upfront (no copying of data per match (snprintf)).
  25. - performance:
  26. - benchmark rule matching (timing).
  27. - bloom filters? some kind of cache?
  28. - optimize simple filter case.
  29. - also for single wildcard (at most start or end)? */bla or /bla*
  30. - support separator "^" = [/\?]?
  31. - test it better.
  32. - CSS: separate CSS rules so it never is iterated in request rules.
  33. ? Cache all global rules, iterate site rules per site?
  34. - there is a websocket option? ignore it: block it in surf itself.
  35. test if websockets use ws:// prefix.
  36. - show linenr on error / ignored rule.
  37. Docs:
  38. - https://adblockplus.org/en/filter-cheatsheet
  39. - https://adblockplus.org/filters
  40. - On out-of-memory situations don't crash the page, but how to handle it?
  41. - CSS blocking: don't allow sites to override the appended global and
  42. site-specific stylesheet.
  43. - separate between site-specific and global block rules.
  44. - optimize matching:
  45. ? hashtable per domain for specific rules or use bloom filters for matching?
  46. - separate general block rules into a separate list.
  47. - test: just use a simple strstr/strcasestr for patterns with no wildcards
  48. and no matchbegin/matchend. Use strncmp/strcasecmp for patterns with no wildcards
  49. and matchbegin or matchend set.
  50. - make less CPU intensive.
  51. - maybe even include it statically?
  52. - optimize CSS rule matching (only per site?).
  53. - optimize memory allocation.
  54. - optimize: pregenerate one global stylesheet that applies to all sites?
  55. - separate adblocker into daemon? not sure.