CARVIEW |
Select Language
HTTP/2 200
date: Fri, 25 Jul 2025 01:05:55 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/"ca4d70254cdf449b47275efdf13849ce"
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 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=69Cl3HpChrP8P0QCUjPRYdtdvO6b9PPYO9r95uH0zYhO3uL17Qlsq6sMC5wNZIn2cqg9%2Fglt1AsIOPq%2BREHr5FFdMFeLOvuXKn866PjqLoLtB6iET99AyXHiiTREF%2BjwNoXh4L577ImIdBPrEAAwrNwz%2Bx%2BjB6gHN0rBBNQsmBlZ1mMrZ%2BydKP1phRXXG8X8773wp%2BKoTr7d1x6G%2FTNWn8FYRRy8DvVwS0oN1iJ%2BhG%2FridSqc44rPU%2BLkOAOWc65DMI78BZRFGQcvNOX3OGJ9g%3D%3D--yc89Ly0eeERyk4K8--Jq7TsFp3tvXDY7MMY%2FMAFg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1308057282.1753405554; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 01:05:54 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 01:05:54 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 883A:3FCB1:671A6:A0D71:6882D871
Add ability to inject scriptlets according to origin of ancestor cont… · gorhill/uBlock@a483f79 · GitHub
Copy file name to clipboardExpand all lines: src/js/cosmetic-filtering.js
Copy file name to clipboardExpand all lines: src/js/scriptlet-filtering-core.js
Copy file name to clipboardExpand all lines: src/js/scriptlet-filtering.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 a483f79
committed
Add ability to inject scriptlets according to origin of ancestor contexts
New syntax for scriptlet-based filtering: it is now possible to
inject a scriptlet in a context according to whether an ancestor
origin matches a specific hostname. Example:
example.com>>##+js(set, iAmEmbeddedInExampleDotCom, true)
The new `>>` specifier means that the scriptlet will not be injected
in `example.com`, but will be injected in all direct and indirect
embedded contexts in pages loaded from `example.com`
The new ancestor domain specifier also works for entity directives:
example.*##+js(set, iAmEmbeddedInExampleDotEffectiveTLD, true)
This is an experimental feature, to be further evaluated and
discussed by filter list maintainers. This is not a complete
implementation, by choice. Do not open issues regarding this
new syntax, the current shortcomings are known.
The new syntax is being discussed internally at:
uBlockOrigin/uBlock-discussions#2441 parent e636c32 commit a483f79Copy full SHA for a483f79
File tree
Expand file treeCollapse file tree
10 files changed
+102
-43
lines changedFilter options
- src/js
Expand file treeCollapse file tree
10 files changed
+102
-43
lines changed-1Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
321 | 321 |
| |
322 | 322 |
| |
323 | 323 |
| |
324 |
| - | |
325 | 324 |
| |
326 | 325 |
| |
327 | 326 |
| |
|
src/js/cosmetic-filtering.js
Copy file name to clipboardExpand all lines: src/js/cosmetic-filtering.js+4-2Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
| |||
818 | 819 |
| |
819 | 820 |
| |
820 | 821 |
| |
821 |
| - | |
| 822 | + | |
| 823 | + | |
822 | 824 |
| |
823 |
| - | |
| 825 | + | |
824 | 826 |
| |
825 | 827 |
| |
826 | 828 |
| |
|
+1-2Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 | 28 |
| |
30 | 29 |
| |
31 | 30 |
| |
| |||
684 | 683 |
| |
685 | 684 |
| |
686 | 685 |
| |
687 |
| - | |
| 686 | + | |
688 | 687 |
| |
689 | 688 |
| |
690 | 689 |
| |
|
+15Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
535 | 535 |
| |
536 | 536 |
| |
537 | 537 |
| |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
538 | 553 |
| |
539 | 554 |
| |
540 | 555 |
| |
|
src/js/scriptlet-filtering-core.js
Copy file name to clipboardExpand all lines: src/js/scriptlet-filtering-core.js+16-5Lines changed: 16 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
| |||
208 | 209 |
| |
209 | 210 |
| |
210 | 211 |
| |
211 |
| - | |
| 212 | + | |
212 | 213 |
| |
213 | 214 |
| |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
218 | 229 |
| |
219 | 230 |
| |
220 | 231 |
| |
|
src/js/scriptlet-filtering.js
Copy file name to clipboardExpand all lines: src/js/scriptlet-filtering.js+1-2Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 | 26 |
| |
28 | 27 |
| |
29 | 28 |
| |
| |||
335 | 334 |
| |
336 | 335 |
| |
337 | 336 |
| |
338 |
| - | |
| 337 | + | |
339 | 338 |
| |
340 | 339 |
| |
341 | 340 |
| |
|
src/js/static-filtering-parser.js
Copy file name to clipboardExpand all lines: src/js/static-filtering-parser.js+53-31Lines changed: 53 additions & 31 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
335 | 335 |
| |
336 | 336 |
| |
337 | 337 |
| |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
338 | 359 |
| |
339 | 360 |
| |
340 | 361 |
| |
| |||
1839 | 1860 |
| |
1840 | 1861 |
| |
1841 | 1862 |
| |
1842 |
| - | |
| 1863 | + | |
1843 | 1864 |
| |
1844 | 1865 |
| |
1845 | 1866 |
| |
| |||
2018 | 2039 |
| |
2019 | 2040 |
| |
2020 | 2041 |
| |
2021 |
| - | |
| 2042 | + | |
2022 | 2043 |
| |
2023 | 2044 |
| |
2024 | 2045 |
| |
2025 |
| - | |
| 2046 | + | |
2026 | 2047 |
| |
2027 | 2048 |
| |
2028 | 2049 |
| |
| |||
2054 | 2075 |
| |
2055 | 2076 |
| |
2056 | 2077 |
| |
2057 |
| - | |
| 2078 | + | |
2058 | 2079 |
| |
2059 | 2080 |
| |
2060 | 2081 |
| |
| |||
2128 | 2149 |
| |
2129 | 2150 |
| |
2130 | 2151 |
| |
2131 |
| - | |
| 2152 | + | |
2132 | 2153 |
| |
2133 | 2154 |
| |
2134 | 2155 |
| |
| |||
2173 | 2194 |
| |
2174 | 2195 |
| |
2175 | 2196 |
| |
2176 |
| - | |
2177 |
| - | |
2178 |
| - | |
2179 |
| - | |
2180 |
| - | |
2181 |
| - | |
2182 | 2197 |
| |
2183 |
| - | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
2184 | 2205 |
| |
2185 |
| - | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
2186 | 2217 |
| |
2187 |
| - | |
2188 |
| - | |
2189 |
| - | |
2190 |
| - | |
2191 |
| - | |
2192 |
| - | |
| 2218 | + | |
| 2219 | + | |
2193 | 2220 |
| |
2194 | 2221 |
| |
2195 | 2222 |
| |
| |||
2207 | 2234 |
| |
2208 | 2235 |
| |
2209 | 2236 |
| |
2210 |
| - | |
| 2237 | + | |
| 2238 | + | |
2211 | 2239 |
| |
2212 | 2240 |
| |
2213 | 2241 |
| |
| |||
2800 | 2828 |
| |
2801 | 2829 |
| |
2802 | 2830 |
| |
2803 |
| - | |
2804 |
| - | |
2805 |
| - | |
2806 |
| - | |
2807 |
| - | |
2808 |
| - | |
2809 | 2831 |
| |
2810 | 2832 |
| |
2811 | 2833 |
| |
2812 | 2834 |
| |
2813 |
| - | |
| 2835 | + | |
2814 | 2836 |
| |
2815 | 2837 |
| |
2816 | 2838 |
| |
2817 | 2839 |
| |
2818 | 2840 |
| |
2819 | 2841 |
| |
2820 | 2842 |
| |
2821 |
| - | |
| 2843 | + | |
2822 | 2844 |
| |
2823 | 2845 |
| |
2824 |
| - | |
| 2846 | + | |
2825 | 2847 |
| |
2826 | 2848 |
| |
2827 |
| - | |
| 2849 | + | |
2828 | 2850 |
| |
2829 | 2851 |
| |
2830 | 2852 |
| |
| |||
2841 | 2863 |
| |
2842 | 2864 |
| |
2843 | 2865 |
| |
2844 |
| - | |
| 2866 | + | |
2845 | 2867 |
| |
2846 | 2868 |
| |
2847 | 2869 |
| |
|
+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
928 | 928 |
| |
929 | 929 |
| |
930 | 930 |
| |
| 931 | + | |
931 | 932 |
| |
932 | 933 |
| |
933 | 934 |
| |
|
+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1256 | 1256 |
| |
1257 | 1257 |
| |
1258 | 1258 |
| |
| 1259 | + | |
1259 | 1260 |
| |
1260 | 1261 |
| |
1261 | 1262 |
| |
|
+10Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
73 | 82 |
| |
74 | 83 |
| |
75 | 84 |
| |
| |||
164 | 173 |
| |
165 | 174 |
| |
166 | 175 |
| |
| 176 | + | |
167 | 177 |
| |
168 | 178 |
| |
169 | 179 |
| |
|
You can’t perform that action at this time.
0 commit comments