Open sn260591 opened 2 years ago
I tried on 1.44.1b0 and looks like html filters don't work on any path, only on page root.
I tried h1
html filter on http://example.org/asdf
with matches-path - did not work. I tried it without matches-path
and it also did not work, but worked on http://example.org/
.
Probably because http://example.org/asdf
returns 404.
// bit 0: can be used as auto-completion hint
// bit 1: can not be used in HTML filtering
//
Parser.prototype.proceduralOperatorTokens = new Map([
[ '-abp-contains', 0b00 ],
[ '-abp-has', 0b00, ],
[ 'contains', 0b00, ],
[ 'has', 0b01 ],
[ 'has-text', 0b01 ],
[ 'if', 0b00 ],
[ 'if-not', 0b00 ],
[ 'matches-css', 0b11 ],
[ 'matches-css-after', 0b11 ],
[ 'matches-css-before', 0b11 ],
[ 'matches-media', 0b11 ],
[ 'matches-path', 0b11 ],
[ 'min-text-length', 0b01 ],
[ 'not', 0b01 ],
[ 'nth-ancestor', 0b00 ],
[ 'others', 0b01 ],
[ 'remove', 0b11 ],
[ 'style', 0b11 ],
[ 'upward', 0b01 ],
[ 'watch-attr', 0b11 ],
[ 'watch-attrs', 0b00 ],
[ 'xpath', 0b01 ],
]);
I did not implement it for HTML filters.
Prerequisites
I tried to reproduce the issue when...
Description
See title.
A specific URL where the issue occurs
https://github.com/uBlockOrigin/uBlock-issues
Steps to Reproduce
github.com##^:matches-path(/uBlockOrigin) .Header
to user filters.Expected behavior
The header at the top has been removed.
Actual behavior
The header at the top has not been removed.
uBlock Origin version
1.44.0
Browser name and version
Firefox 103.0.2
Operating System and version
Windows 7