CARVIEW |
Select Language
HTTP/2 200
date: Thu, 31 Jul 2025 01:40:29 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/gorhill/uBlock.git
etag: W/"4736ff419a5643b6076e746d25627b56"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=7nTN8T1qBlVTnTSF90Qoinhd%2B8itgBY4zIq1Kf4AhOjIp0fA7bp%2BcoEHkNTJk6xwJY930FJz0sydN79LoW7xSS1LkNFBtzy6BkjGFZ4pO%2BMhKYKlgbkHvCd3xABDN3fyyZkKKNVO9ZQ1bmyrqHOrGUxrtmSEJuJUbo9RId9r24B33xSE5kNPpFcMwJJcTwe%2B%2FAp4JchBPO%2Bvf5MnqSgDV%2FE8p4U6uyzz8WtlWpBRUAHL9it8fohQ6r3V3dUiYXy9XnsKiq0ZElG5TQ5u2cmkNA%3D%3D--y6%2FJDYP5ZhJ0SQp5--IUzPOHIPJ5UGUDFHR%2FKFvA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1967772341.1753926029; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 01:40:29 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 01:40:29 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: C588:111CDC:13D77A:1DF27D:688AC98D
Add new procedural cosmetic filter operator: `:matches-media()` · gorhill/uBlock@40c315a · GitHub
Copy file name to clipboardExpand all lines: src/js/contentscript-extra.js
Copy file name to clipboardExpand all lines: src/js/static-filtering-parser.js
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit 40c315a
committed
Add new procedural cosmetic filter operator:
Related issue:
- uBlockOrigin/uBlock-issues#2185
The argument must be a valid media query as documented on MDN, i.e.
what appears between the `@media` at-rule and the first opening
curly bracket (including the parentheses when required):
- https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
Best practice:
Use `:matches-media()` after plain CSS selectors, if any.
Good:
example.com###target-1 > .target-2:matches-media((min-width: 800px))
Bad (though this will still work):
example.com##:matches-media((min-width: 800px)) #target-1 > .target-2
The reason for this is to keep the door open for a future optimisation
where uBO could convert `:matches-media()`-based filters into CSS media
rules injected declaratively in a user stylesheet.:matches-media()
1 parent deb5fea commit 40c315aCopy full SHA for 40c315a
File tree
Expand file treeCollapse file tree
2 files changed
+42
-6
lines changedFilter options
- src/js
Expand file treeCollapse file tree
2 files changed
+42
-6
lines changedsrc/js/contentscript-extra.js
Copy file name to clipboardExpand all lines: src/js/contentscript-extra.js+25-5Lines changed: 25 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
| 107 | + | |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
111 | 119 |
| |
112 | 120 |
| |
113 |
| - | |
114 |
| - | |
115 |
| - | |
| 121 | + | |
| 122 | + | |
116 | 123 |
| |
117 | 124 |
| |
118 | 125 |
| |
| |||
132 | 139 |
| |
133 | 140 |
| |
134 | 141 |
| |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
135 | 154 |
| |
136 | 155 |
| |
137 | 156 |
| |
| |||
322 | 341 |
| |
323 | 342 |
| |
324 | 343 |
| |
| 344 | + | |
325 | 345 |
| |
326 | 346 |
| |
327 | 347 |
| |
|
src/js/static-filtering-parser.js
Copy file name to clipboardExpand all lines: src/js/static-filtering-parser.js+17-1Lines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1581 | 1581 |
| |
1582 | 1582 |
| |
1583 | 1583 |
| |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1584 | 1596 |
| |
1585 | 1597 |
| |
1586 | 1598 |
| |
| |||
1702 | 1714 |
| |
1703 | 1715 |
| |
1704 | 1716 |
| |
| 1717 | + | |
1705 | 1718 |
| |
1706 | 1719 |
| |
1707 | 1720 |
| |
| |||
1878 | 1891 |
| |
1879 | 1892 |
| |
1880 | 1893 |
| |
| 1894 | + | |
| 1895 | + | |
1881 | 1896 |
| |
1882 | 1897 |
| |
1883 | 1898 |
| |
| |||
1918 | 1933 |
| |
1919 | 1934 |
| |
1920 | 1935 |
| |
1921 |
| - | |
| 1936 | + | |
| 1937 | + | |
1922 | 1938 |
| |
1923 | 1939 |
| |
1924 | 1940 |
| |
|
You can’t perform that action at this time.
0 commit comments