1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00

Fix broken :spath operators starting with >

Related feedback:
- 7dd48a6c8c (r41180568)

Regression from:
- 7dd48a6c8c
This commit is contained in:
Raymond Hill 2020-08-04 11:30:04 -04:00
parent 49aa9ba549
commit 4c6ee1e0d3
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -574,6 +574,10 @@ vAPI.injectScriptlet = function(doc, text) {
constructor(task) {
this.spath = task[1];
this.nth = /^(?:\s*[+~]|:)/.test(this.spath);
if ( this.nth ) { return; }
if ( /^\s*>/.test(this.spath) ) {
this.spath = `:scope ${this.spath.trim()}`;
}
}
qsa(node) {
if ( this.nth === false ) {