1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 11:57:59 +01:00

Fix #326 (:style -append not working as expected).

This commit is contained in:
Doug Kearns
2009-08-10 07:13:15 +10:00
parent 519908eb2e
commit c43dbf510e
3 changed files with 35 additions and 25 deletions

View File

@@ -583,7 +583,7 @@ liberator.registerObserver("load_commands", function () {
if (sheet) if (sheet)
{ {
filter = sheet.sites.concat(filter).join(","); filter = sheet.sites.concat(filter).join(",");
css = sheet.css.replace(/;?\s*$/, "; " + css); css = sheet.css + " " + css;
} }
} }
let err = styles.addSheet(false, name, filter, css); let err = styles.addSheet(false, name, filter, css);

View File

@@ -15,13 +15,15 @@ The ColorScheme autocommand is triggered after the color scheme has been
sourced. sourced.
________________________________________________________________________________ ________________________________________________________________________________
|:hi| |:highlight| + |:hi| |:highlight| +
||:hi[ghlight][!] [-append] {group} [[{selector}] {css}]|| + ||:hi[ghlight][!] [-append] {group} [[{selector}] {css}]|| +
________________________________________________________________________________ ________________________________________________________________________________
Highlight {group} with {css}. Normally, {css} is checked for valid Highlight {group} with {css}. {css} is one or more comma separated CSS
syntax before it's applied. Once you're certain it's valid, [!] can be declarations (E.g. *color: blue; background-color: red*). Normally, {css} is
used to skip the check to speed up Vimperator startup. {selector} can checked for valid syntax before it's applied. Once you're certain it's valid,
be any valid CSS selector, such as [c]:hover[c], and, if provided, will [!] can be used to skip the check to speed up Vimperator startup. {selector}
can be any valid CSS selector, such as [c]:hover[c], and, if provided, will
restrict the match to matching elements. restrict the match to matching elements.
Valid groups are: Valid groups are:
@@ -92,6 +94,7 @@ appended to its current value. If {css} is not provided, any styles matching
{group} are listed, or all styles if no {group} provided. {group} are listed, or all styles if no {group} provided.
________________________________________________________________________________ ________________________________________________________________________________
|:highlight-clear| + |:highlight-clear| +
||:hi[ghlight] clear [{group} [{selector}]]|| + ||:hi[ghlight] clear [{group} [{selector}]]|| +
________________________________________________________________________________ ________________________________________________________________________________
@@ -103,18 +106,20 @@ ________________________________________________________________________________
|:sty| |:style| + |:sty| |:style| +
||:sty[le][!] [-name={name}] [-append] {filter} [{css}]|| + ||:sty[le][!] [-name={name}] [-append] {filter} [{css}]|| +
________________________________________________________________________________ ________________________________________________________________________________
Add CSS styles to the browser or to web pages. {filter} is a comma Add CSS styles to the browser or to web pages. {filter} is a comma separated
separated list of URLs to match. URLs ending with *** are matched as list of URLs to match. URLs ending with *** are matched as prefixes, URLs not
prefixes, URLs not containing any *:* or */* characters are containing any *:* or */* characters are matched as domains. {css} is a full
matched as domains. If {name} (short option: *-n*) is provided, any CSS rule set (E.g. *body { color: blue; }*).
existing style with the same name is overridden, and the style may later
be deleted using {name}. If *-append* (short option: *-a*) is provided If {name} (short option: *-n*) is provided, any existing style with the same
along with *-name*, {css} and {filter} are appended to its current name is overridden, and the style may later be deleted using {name}. If
value. *-append* (short option: *-a*) is provided along with *-name*, {css} and
{filter} are appended to its current value.
If {css} isn't provided, matching styles are listed. If {css} isn't provided, matching styles are listed.
________________________________________________________________________________ ________________________________________________________________________________
|:dels| |:delstyle| + |:dels| |:delstyle| +
||:dels[tyle] [-name={name}] [-index={index}] [{filter}] [{css}]|| + ||:dels[tyle] [-name={name}] [-index={index}] [{filter}] [{css}]|| +
________________________________________________________________________________ ________________________________________________________________________________

View File

@@ -15,13 +15,15 @@ The ColorScheme autocommand is triggered after the color scheme has been
sourced. sourced.
________________________________________________________________________________ ________________________________________________________________________________
|:hi| |:highlight| + |:hi| |:highlight| +
||:hi[ghlight][!] [-append] {group} [[{selector}] {css}]|| + ||:hi[ghlight][!] [-append] {group} [[{selector}] {css}]|| +
________________________________________________________________________________ ________________________________________________________________________________
Highlight {group} with {css}. Normally, {css} is checked for valid Highlight {group} with {css}. {css} is one or more comma separated CSS
syntax before it's applied. Once you're certain it's valid, [!] can be declarations (E.g. *color: blue; background-color: red*). Normally, {css} is
used to skip the check to speed up Vimperator startup. {selector} can checked for valid syntax before it's applied. Once you're certain it's valid,
be any valid CSS selector, such as [c]:hover[c], and, if provided, will [!] can be used to skip the check to speed up Vimperator startup. {selector}
can be any valid CSS selector, such as [c]:hover[c], and, if provided, will
restrict the match to matching elements. restrict the match to matching elements.
Valid groups are: Valid groups are:
@@ -92,6 +94,7 @@ appended to its current value. If {css} is not provided, any styles matching
{group} are listed, or all styles if no {group} provided. {group} are listed, or all styles if no {group} provided.
________________________________________________________________________________ ________________________________________________________________________________
|:highlight-clear| + |:highlight-clear| +
||:hi[ghlight] clear [{group} [{selector}]]|| + ||:hi[ghlight] clear [{group} [{selector}]]|| +
________________________________________________________________________________ ________________________________________________________________________________
@@ -103,18 +106,20 @@ ________________________________________________________________________________
|:sty| |:style| + |:sty| |:style| +
||:sty[le][!] [-name={name}] [-append] {filter} [{css}]|| + ||:sty[le][!] [-name={name}] [-append] {filter} [{css}]|| +
________________________________________________________________________________ ________________________________________________________________________________
Add CSS styles to the player or to web pages. {filter} is a comma Add CSS styles to the browser or to web pages. {filter} is a comma separated
separated list of URLs to match. URLs ending with *** are matched as list of URLs to match. URLs ending with *** are matched as prefixes, URLs not
prefixes, URLs not containing any *:* or */* characters are containing any *:* or */* characters are matched as domains. {css} is a full
matched as domains. If {name} (short option: *-n*) is provided, any CSS rule set (E.g. *body { color: blue; }*).
existing style with the same name is overridden, and the style may later
be deleted using {name}. If *-append* (short option: *-a*) is provided If {name} (short option: *-n*) is provided, any existing style with the same
along with *-name*, {css} and {filter} are appended to its current name is overridden, and the style may later be deleted using {name}. If
value. *-append* (short option: *-a*) is provided along with *-name*, {css} and
{filter} are appended to its current value.
If {css} isn't provided, matching styles are listed. If {css} isn't provided, matching styles are listed.
________________________________________________________________________________ ________________________________________________________________________________
|:dels| |:delstyle| + |:dels| |:delstyle| +
||:dels[tyle] [-name={name}] [-index={index}] [{filter}] [{css}]|| + ||:dels[tyle] [-name={name}] [-index={index}] [{filter}] [{css}]|| +
________________________________________________________________________________ ________________________________________________________________________________