mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Enable path for native has()
selector in Firefox
Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1858743
This commit is contained in:
parent
c090ab1d1d
commit
c5724c1cce
@ -155,6 +155,9 @@ vAPI.webextFlavor = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1858743
|
||||||
|
// Add support for native `:has()` for Firefox 121+
|
||||||
|
|
||||||
(( ) => {
|
(( ) => {
|
||||||
const ua = navigator.userAgent;
|
const ua = navigator.userAgent;
|
||||||
const flavor = vAPI.webextFlavor;
|
const flavor = vAPI.webextFlavor;
|
||||||
@ -184,13 +187,16 @@ vAPI.webextFlavor = {
|
|||||||
flavor.major = parseInt(info.version, 10) || flavor.major;
|
flavor.major = parseInt(info.version, 10) || flavor.major;
|
||||||
soup.add(info.vendor.toLowerCase())
|
soup.add(info.vendor.toLowerCase())
|
||||||
.add(info.name.toLowerCase());
|
.add(info.name.toLowerCase());
|
||||||
|
if ( flavor.major >= 121 && soup.has('mobile') === false ) {
|
||||||
|
soup.add('native_css_has');
|
||||||
|
}
|
||||||
dispatch();
|
dispatch();
|
||||||
});
|
});
|
||||||
if ( browser.runtime.getURL('').startsWith('moz-extension://') ) {
|
if ( browser.runtime.getURL('').startsWith('moz-extension://') ) {
|
||||||
soup.add('firefox')
|
soup.add('firefox')
|
||||||
.add('user_stylesheet')
|
.add('user_stylesheet')
|
||||||
.add('html_filtering');
|
.add('html_filtering');
|
||||||
flavor.major = 91;
|
flavor.major = 115;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user