Enable path for native `has()` selector in Firefox · gorhill/uBlock@c5724c1 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit c5724c1

Browse files
committed
Enable path for native has() selector in Firefox
Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1858743
1 parent c090ab1 commit c5724c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

platform/common/vapi-common.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ vAPI.webextFlavor = {
155155
}
156156
};
157157

158+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1858743
159+
// Add support for native `:has()` for Firefox 121+
160+
158161
(( ) => {
159162
const ua = navigator.userAgent;
160163
const flavor = vAPI.webextFlavor;
@@ -184,13 +187,16 @@ vAPI.webextFlavor = {
184187
flavor.major = parseInt(info.version, 10) || flavor.major;
185188
soup.add(info.vendor.toLowerCase())
186189
.add(info.name.toLowerCase());
190+
if ( flavor.major >= 121 && soup.has('mobile') === false ) {
191+
soup.add('native_css_has');
192+
}
187193
dispatch();
188194
});
189195
if ( browser.runtime.getURL('').startsWith('moz-extension://') ) {
190196
soup.add('firefox')
191197
.add('user_stylesheet')
192198
.add('html_filtering');
193-
flavor.major = 91;
199+
flavor.major = 115;
194200
}
195201
return;
196202
}

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.