mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-05 11:55:47 +01:00
Fix highlight empty CSS stuff.
This commit is contained in:
@@ -178,11 +178,14 @@ function Highlights(name, store, serial)
|
||||
|
||||
let css = newStyle.replace(/(?:!\s*important\s*)?(?:;?\s*$|;)/g, "!important;")
|
||||
.replace(";!important;", ";", "g"); // Seeming Spidermonkey bug
|
||||
css = style.selector + " { " + css + " }";
|
||||
if (!/^\s*(?:!\s*important\s*)?;*\s*$/.test(css))
|
||||
{
|
||||
css = style.selector + " { " + css + " }";
|
||||
|
||||
let error = styles.addSheet(true, style.selector, style.filter, css);
|
||||
if (error)
|
||||
return error;
|
||||
let error = styles.addSheet(true, style.selector, style.filter, css);
|
||||
if (error)
|
||||
return error;
|
||||
}
|
||||
style.value = newStyle;
|
||||
highlight[style.class] = style;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user