2018-02-28 23:51:33 +00:00
|
|
|
.codeMirrorContainer {
|
2020-04-10 22:17:12 +00:00
|
|
|
line-height: 1.25;
|
2018-02-28 23:51:33 +00:00
|
|
|
overflow: hidden;
|
2018-03-04 19:07:01 +00:00
|
|
|
position: relative;
|
2018-03-04 23:09:06 +00:00
|
|
|
}
|
2018-02-28 23:51:33 +00:00
|
|
|
.CodeMirror {
|
2022-01-30 23:35:26 +00:00
|
|
|
background-color: var(--surface-0);
|
2018-02-28 23:51:33 +00:00
|
|
|
box-sizing: border-box;
|
2022-01-30 23:35:26 +00:00
|
|
|
color: var(--ink-1);
|
2018-03-04 23:09:06 +00:00
|
|
|
flex-grow: 1;
|
2022-02-09 13:35:24 +00:00
|
|
|
font-size: var(--monospace-size);
|
2018-02-28 23:51:33 +00:00
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
2018-03-04 23:09:06 +00:00
|
|
|
}
|
2022-01-30 23:35:26 +00:00
|
|
|
.CodeMirror-cursor {
|
|
|
|
|
border-color: var(--cm-cursor);
|
|
|
|
|
}
|
2022-02-04 23:31:00 +00:00
|
|
|
.CodeMirror-selected {
|
|
|
|
|
background-color: var(--cm-selection-surface);
|
|
|
|
|
}
|
2022-01-30 23:35:26 +00:00
|
|
|
.CodeMirror-focused .CodeMirror-selected {
|
2022-02-04 23:31:00 +00:00
|
|
|
background-color: var(--cm-selection-focused-surface);
|
2022-01-30 23:35:26 +00:00
|
|
|
}
|
|
|
|
|
.CodeMirror-foldmarker {
|
|
|
|
|
color: var(--cm-foldmarker-ink);
|
|
|
|
|
font-size: large;
|
|
|
|
|
text-shadow: none;
|
2020-10-21 16:50:24 +00:00
|
|
|
}
|
2020-10-02 16:18:13 +00:00
|
|
|
.CodeMirror-gutters {
|
|
|
|
|
background-color: var(--cm-gutter-surface);
|
|
|
|
|
border-color: var(--cm-gutter-border);
|
|
|
|
|
}
|
2022-01-30 23:35:26 +00:00
|
|
|
.CodeMirror-line::selection,
|
|
|
|
|
.CodeMirror-line > span::selection,
|
|
|
|
|
.CodeMirror-line > span > span::selection {
|
2022-02-05 12:42:17 +00:00
|
|
|
background-color: var(--cm-selection-focused-surface);
|
2022-01-30 23:35:26 +00:00
|
|
|
}
|
2020-10-02 16:18:13 +00:00
|
|
|
.CodeMirror-linenumber {
|
|
|
|
|
color: var(--cm-gutter-ink);
|
|
|
|
|
}
|
2022-01-30 23:35:26 +00:00
|
|
|
.CodeMirror-lines {
|
|
|
|
|
padding-bottom: 6rem;
|
|
|
|
|
}
|
|
|
|
|
.CodeMirror-matchingbracket {
|
|
|
|
|
color: unset;
|
|
|
|
|
}
|
|
|
|
|
.CodeMirror-matchingbracket {
|
|
|
|
|
background-color: var(--cm-matchingbracket) !important;
|
|
|
|
|
color: inherit !important;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.CodeMirror-search-match {
|
|
|
|
|
background: none;
|
|
|
|
|
background-color: var(--cm-search-match-surface);
|
|
|
|
|
border: 0;
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
2018-03-04 23:09:06 +00:00
|
|
|
|
|
|
|
|
/* For when panels are used */
|
2018-03-11 14:59:39 +00:00
|
|
|
.codeMirrorContainer > div:not([class^="CodeMirror"]) {
|
2018-03-04 23:09:06 +00:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-15 13:25:18 +00:00
|
|
|
.codeMirrorContainer.codeMirrorBreakAll .CodeMirror-wrap pre {
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-comment {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--sf-comment-ink);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-def {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--sf-def-ink);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-directive {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--sf-directive-ink);
|
|
|
|
|
font-weight: bold;
|
2020-06-08 16:39:31 +00:00
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-error {
|
2020-06-13 12:48:56 +00:00
|
|
|
color: inherit;
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-error,
|
2020-06-04 11:18:54 +00:00
|
|
|
.CodeMirror-linebackground.error {
|
2020-10-02 16:18:13 +00:00
|
|
|
background-color: var(--sf-error-surface);
|
2023-04-01 22:11:41 +00:00
|
|
|
text-decoration: var(--sf-error-ink) dashed underline;
|
2020-09-30 14:01:10 +00:00
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-link {
|
2020-09-30 14:01:10 +00:00
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-link:hover {
|
2020-09-30 14:01:10 +00:00
|
|
|
color: var(--link-ink);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-keyword {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--sf-keyword-ink);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-negative {
|
2022-01-30 23:35:26 +00:00
|
|
|
color: var(--cm-negative);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-positive {
|
2022-01-30 23:35:26 +00:00
|
|
|
color: var(--cm-positive);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-notice {
|
2020-10-02 16:18:13 +00:00
|
|
|
text-underline-position: under;
|
Add support for `1P`, `3P`, `header=` filter options and other changes
New filter options
==================
Strict partyness: `1P`, `3P`
----------------------------
The current options 1p/3p are meant to "weakly" match partyness, i.e. a
network request is considered 1st-party to its context as long as both the
context and the request share the same base domain.
The new partyness options are meant to check for strict partyness, i.e. a
network request will be considered 1st-party if and only if both the context
and the request share the same hostname.
For examples:
- context: `www.example.org`
- request: `www.example.org`
- `1p`: yes, `1P`: yes
- `3p`: no, `3P`: no
- context: `www.example.org`
- request: `subdomain.example.org`
- `1p`: yes, `1P`: no
- `3p`: no, `3P`: yes
- context: `www.example.org`
- request: `www.example.com`
- `1p`: no, `1P`: no
- `3p`: yes, `3P`: yes
The strict partyness options will be visually emphasized in the editor so as
to prevent mistakenly using `1P` or `3P` where weak partyness is meant to be
used.
Filter on response headers: `header=`
-------------------------------------
Currently experimental and under evaluation. Disabled by default, enable by
toggling `filterOnHeaders` to `true` in advanced settings.
Ability to filter network requests according to whether a specific response
header is present and whether it matches or does not match a specific value.
For example:
*$1p,3P,script,header=via:1\.1\s+google
The above filter is meant to block network requests which fullfill all the
following conditions:
- is weakly 1st-party to the context
- is not strictly 1st-party to the context
- is of type `script`
- has a response HTTP header named `via`, which value matches the regular
expression `1\.1\s+google`.
The matches are always performed in a case-insensitive manner.
The header value is assumed to be a literal regular expression, except for
the following special characters:
- to anchor to start of string, use leading `|`, not `^`
- to anchor to end of string, use trailing `|`, not `$`
- to invert the test, use a leading `!`
To block a network request if it merely contains a specific HTTP header is
just a matter of specifying the header name without a header value:
*$1p,3P,script,header=via
Generic exception filters can be used to disable specific block `header=`
filters, i.e. `@@*$1p,3P,script,header` will override the block `header=`
filters given as example above.
Dynamic filtering's `allow` rules override block `headers=` filters.
Important: It is key that filter authors use as many narrowing filter options
as possible when using the `header=` option, and the `header=` option should
be used ONLY when other filter options are not sufficient.
More documentation justifying the purpose of `header=` option will be
provided eventually if ever it is decided to move it from experimental to
stable status.
To be decided: to restrict usage of this filter option to only uBO's own
filter lists or "My filters".
Changes
=======
Fine tuning `queryprune=`
-------------------------
The following changes have been implemented:
The special value `*` (i.e. `queryprune=*`) means "remove all query
parameters".
If the `queryprune=` value is made only of alphanumeric characters
(including `_`), the value will be internally converted to regex equivalent
`^value=`. This ensures a better future compatibility with AdGuard's
`removeparam=`.
If the `queryprune=` value starts with `!`, the test will be inverted. This
can be used to remove all query parameters EXCEPT those who match the
specified value.
Other
-----
The legacy code to test for spurious CSP reports has been removed. This
is no longer an issue ever since uBO redirects to local resources through
web accessible resources.
Notes
=====
The following new and recently added filter options are not compatible with
Chromium's manifest v3 changes:
- `queryprune=`
- `1P`
- `3P`
- `header=`
2020-11-23 13:22:43 +00:00
|
|
|
text-decoration-color: var(--sf-notice-ink);
|
2020-10-02 16:18:13 +00:00
|
|
|
text-decoration-style: solid;
|
|
|
|
|
text-decoration-line: underline;
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-unicode {
|
2023-01-23 21:53:18 +00:00
|
|
|
text-underline-position: under;
|
|
|
|
|
text-decoration-color: var(--sf-unicode-ink);
|
|
|
|
|
text-decoration-style: dashed;
|
|
|
|
|
text-decoration-line: underline;
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-tag {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--sf-tag-ink);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-value {
|
2023-03-01 16:04:40 +00:00
|
|
|
color: var(--sf-value-ink);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-variable {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--sf-variable-ink);
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-warning {
|
2022-02-02 20:40:47 +00:00
|
|
|
background-color: var(--sf-warning-surface);
|
2020-10-02 16:18:13 +00:00
|
|
|
text-decoration: underline var(--sf-warning-ink);
|
|
|
|
|
text-underline-position: under;
|
|
|
|
|
}
|
2023-03-03 01:50:32 +00:00
|
|
|
.cm-theme-override .cm-s-default .cm-readonly {
|
2021-01-05 17:16:50 +00:00
|
|
|
color: var(--sf-readonly-ink);
|
|
|
|
|
}
|
2018-03-04 19:07:01 +00:00
|
|
|
|
2020-08-24 16:39:07 +00:00
|
|
|
/* Rules */
|
|
|
|
|
.cm-s-default .cm-allowrule {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--df-allow-ink);
|
2020-08-24 16:39:07 +00:00
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
.cm-s-default .cm-blockrule {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--df-block-ink);
|
2020-08-24 16:39:07 +00:00
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
.cm-s-default .cm-nooprule {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--df-noop-ink);
|
2020-08-24 16:39:07 +00:00
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
.cm-s-default .cm-sortkey {
|
2020-10-02 16:18:13 +00:00
|
|
|
color: var(--sf-keyword-ink);
|
2020-08-24 16:39:07 +00:00
|
|
|
}
|
|
|
|
|
|
2018-03-04 19:07:01 +00:00
|
|
|
.cm-search-widget {
|
|
|
|
|
align-items: center;
|
2020-10-02 16:18:13 +00:00
|
|
|
background-color: var(--cm-gutter-surface);
|
|
|
|
|
border-bottom: 1px solid var(--cm-gutter-border);
|
2018-03-17 00:49:00 +00:00
|
|
|
cursor: default;
|
2018-03-16 23:38:43 +00:00
|
|
|
direction: ltr;
|
2018-03-04 19:07:01 +00:00
|
|
|
display: flex;
|
2018-03-04 23:23:01 +00:00
|
|
|
flex-shrink: 0;
|
2020-08-03 12:55:02 +00:00
|
|
|
justify-content: space-between;
|
2020-04-16 12:49:34 +00:00
|
|
|
padding: 0.5em;
|
2018-03-04 22:13:27 +00:00
|
|
|
user-select: none;
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
-webkit-user-select: none;
|
2018-03-04 19:07:01 +00:00
|
|
|
z-index: 1000;
|
|
|
|
|
}
|
2023-04-01 20:42:41 +00:00
|
|
|
.cm-search-widget > * {
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
}
|
|
|
|
|
.cm-search-widget > :last-child {
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-03 12:55:02 +00:00
|
|
|
.cm-search-widget-input {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
}
|
2019-05-23 23:29:59 +00:00
|
|
|
.cm-search-widget .fa-icon {
|
2020-10-02 16:18:13 +00:00
|
|
|
fill: var(--cm-gutter-ink);
|
2018-03-04 22:13:27 +00:00
|
|
|
font-size: 140%;
|
|
|
|
|
}
|
2019-05-23 23:29:59 +00:00
|
|
|
.cm-search-widget .fa-icon:not(.fa-icon-ro):hover {
|
2022-02-02 20:40:47 +00:00
|
|
|
fill: var(--ink-1);
|
2019-05-23 23:29:59 +00:00
|
|
|
}
|
2020-08-03 12:55:02 +00:00
|
|
|
.cm-search-widget-input input {
|
2020-10-02 16:18:13 +00:00
|
|
|
border: 1px solid var(--cm-gutter-ink);
|
2018-10-15 17:15:00 +00:00
|
|
|
display: inline-flex;
|
|
|
|
|
flex-grow: 1;
|
2020-08-03 12:55:02 +00:00
|
|
|
max-width: 16em;
|
2018-03-04 19:07:01 +00:00
|
|
|
}
|
2020-08-03 12:55:02 +00:00
|
|
|
.cm-search-widget-count {
|
2018-03-04 19:07:01 +00:00
|
|
|
align-items: center;
|
2020-08-03 12:55:02 +00:00
|
|
|
display: inline-flex;
|
2018-10-15 17:15:00 +00:00
|
|
|
flex-grow: 0;
|
2023-04-02 14:40:44 +00:00
|
|
|
font-size: var(--font-size-smaller);
|
2020-08-03 12:55:02 +00:00
|
|
|
min-width: 6em;
|
|
|
|
|
visibility: hidden;
|
2018-03-04 19:07:01 +00:00
|
|
|
}
|
2020-08-03 12:55:02 +00:00
|
|
|
.cm-search-widget[data-query] .cm-search-widget-count:not(:empty) {
|
|
|
|
|
visibility: visible;
|
2018-03-04 19:07:01 +00:00
|
|
|
}
|
2018-03-04 22:13:27 +00:00
|
|
|
.cm-search-widget .cm-search-widget-button:hover {
|
|
|
|
|
color: #000;
|
2018-03-04 19:07:01 +00:00
|
|
|
}
|
2019-05-23 23:29:59 +00:00
|
|
|
.cm-search-widget .sourceURL[href=""] {
|
2023-04-01 20:42:41 +00:00
|
|
|
visibility: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cm-linter-widget {
|
2023-04-02 14:40:44 +00:00
|
|
|
align-items: center;
|
2019-05-23 23:29:59 +00:00
|
|
|
display: none;
|
2023-04-01 20:42:41 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
|
}
|
|
|
|
|
.cm-linter-widget.hasErrors {
|
2023-04-02 14:40:44 +00:00
|
|
|
display: inline-flex;
|
2023-04-01 20:42:41 +00:00
|
|
|
}
|
|
|
|
|
.cm-linter-widget .cm-linter-widget-count {
|
|
|
|
|
color: var(--accent-surface-1);
|
|
|
|
|
fill: var(--accent-surface-1);
|
2023-04-02 14:40:44 +00:00
|
|
|
font-size: var(--font-size-smaller);
|
2019-05-23 23:29:59 +00:00
|
|
|
}
|
2023-04-01 20:42:41 +00:00
|
|
|
|
2022-01-30 23:35:26 +00:00
|
|
|
.cm-searching.cm-overlay {
|
|
|
|
|
background-color: var(--cm-searching-surface);
|
|
|
|
|
border: 0;
|
|
|
|
|
color: var(--cm-searching-ink);
|
2020-08-04 14:14:38 +00:00
|
|
|
}
|
2018-03-11 14:59:39 +00:00
|
|
|
|
2020-10-02 16:18:13 +00:00
|
|
|
.CodeMirror-merge {
|
|
|
|
|
border-color: var(--cm-gutter-border);
|
|
|
|
|
}
|
2022-01-30 23:35:26 +00:00
|
|
|
.CodeMirror-merge-copy,
|
|
|
|
|
.CodeMirror-merge-copy-reverse {
|
|
|
|
|
color: var(--cm-merge-copy-ink);
|
|
|
|
|
}
|
|
|
|
|
.CodeMirror-merge-l-chunk {
|
2022-02-02 20:40:47 +00:00
|
|
|
background-color: var(--cm-merge-chunk-surface);
|
2022-01-30 23:35:26 +00:00
|
|
|
}
|
|
|
|
|
.CodeMirror-merge-l-chunk-start,
|
|
|
|
|
.CodeMirror-merge-l-chunk-end {
|
2022-02-02 20:40:47 +00:00
|
|
|
border-color: var(--cm-merge-chunk-border);
|
2022-01-30 23:35:26 +00:00
|
|
|
}
|
2018-03-11 14:59:39 +00:00
|
|
|
.CodeMirror-merge-l-deleted {
|
|
|
|
|
background-image: none;
|
|
|
|
|
}
|
|
|
|
|
.CodeMirror-merge-l-inserted {
|
|
|
|
|
background-image: none;
|
|
|
|
|
}
|
2020-04-25 14:19:08 +00:00
|
|
|
/* This probably needs to be added to CodeMirror repo */
|
|
|
|
|
.CodeMirror-merge-gap {
|
2020-10-02 16:18:13 +00:00
|
|
|
background-color: var(--cm-gutter-surface);
|
|
|
|
|
border-color: var(--cm-gutter-border);
|
2020-04-25 14:19:08 +00:00
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
2022-02-11 20:14:31 +00:00
|
|
|
.CodeMirror-merge-scrolllock {
|
|
|
|
|
color: var(--cm-merge-copy-ink);
|
|
|
|
|
}
|
2020-08-25 17:23:30 +00:00
|
|
|
.CodeMirror-merge-spacer {
|
2022-02-02 20:40:47 +00:00
|
|
|
background-color: var(--cm-merge-chunk-surface);
|
2020-08-25 17:23:30 +00:00
|
|
|
}
|
2020-06-16 12:59:55 +00:00
|
|
|
|
|
|
|
|
.CodeMirror-hints {
|
|
|
|
|
z-index: 10000;
|
|
|
|
|
}
|
2022-02-02 20:40:47 +00:00
|
|
|
|
|
|
|
|
/* Must appear after other background color declarations to be sure it
|
|
|
|
|
* overrides them
|
|
|
|
|
* */
|
|
|
|
|
.CodeMirror-activeline-background {
|
|
|
|
|
background-color: var(--cm-active-line);
|
|
|
|
|
}
|
2023-04-01 20:42:41 +00:00
|
|
|
|
|
|
|
|
.CodeMirror-lintmarker {
|
|
|
|
|
background-color: var(--sf-error-ink);
|
|
|
|
|
height: calc(var(--font-size) - 2px);
|
|
|
|
|
margin-top: 1px;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.CodeMirror-lintmarker > span {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.CodeMirror-lintmarker > span {
|
|
|
|
|
background-color: var(--surface-0);
|
|
|
|
|
border: 1px solid var(--sf-error-ink);
|
|
|
|
|
color: var(--ink-1);
|
|
|
|
|
left: 100%;
|
|
|
|
|
padding: var(--default-gap-xsmall);
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: -2px;
|
|
|
|
|
white-space: pre;
|
|
|
|
|
}
|
|
|
|
|
.CodeMirror-lintmarker:hover > span,
|
|
|
|
|
.CodeMirror-lintmarker > span:hover {
|
|
|
|
|
display: initial;
|
|
|
|
|
}
|