mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-07 02:15:45 +01:00
Fix highlight empty CSS stuff.
This commit is contained in:
@@ -1235,8 +1235,6 @@ const liberator = (function () //{{{
|
||||
liberator.reportError(e);
|
||||
}
|
||||
|
||||
liberator.triggerObserver("load");
|
||||
|
||||
// commands must always be the first module to be initialized
|
||||
loadModule("commands", Commands);
|
||||
loadModule("options", Options);
|
||||
@@ -1254,6 +1252,8 @@ const liberator = (function () //{{{
|
||||
if (config.init)
|
||||
config.init();
|
||||
|
||||
liberator.triggerObserver("load");
|
||||
|
||||
liberator.log("All modules loaded", 3);
|
||||
|
||||
// first time intro message
|
||||
|
||||
@@ -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