diff --git a/content/style.js b/content/style.js index aed2d770..287b8ab6 100644 --- a/content/style.js +++ b/content/style.js @@ -26,6 +26,16 @@ function Highlights(name, store, serial) WarningMsg color: red; background: white; Message white-space: normal; min-width: 100%; padding-left: 2em; text-indent: -2em; display: block; + + CompItem + CompItem[selected] background: yellow; + CompItem>* padding: 0 .5ex; + CompIcon width: 16px; + CompIcon>img max-width: 16px; max-height: 16px; vertical-align: middle; + CompResult width: 45%; overflow: hidden; + CompDesc color: gray; + + Indicator color: blue; Filter font-weight: bold; Keyword color: red; @@ -84,7 +94,7 @@ function Highlights(name, store, serial) Highlight.defaultValue("filter", function () "chrome://liberator/content/buffer.xhtml" + "," + config.styleableChrome); Highlight.defaultValue("selector", function () ".hl-" + this.class); Highlight.defaultValue("value", function () this.default); - Highlight.prototype.toString = function () [k + ": " + util.escapeString(v || "undefined") for ([k, v] in this)].join(", "); + Highlight.prototype.toString = function () "Highlight(" + this.class + ")\n\t" + [k + ": " + util.escapeString(v || "undefined") for ([k, v] in this)].join("\n\t"); function keys() [k for ([k, v] in Iterator(highlight))].sort(); this.__iterator__ = function () (highlight[v] for ([k,v] in Iterator(keys()))); @@ -95,7 +105,7 @@ function Highlights(name, store, serial) let [, class, selectors] = key.match(/^([a-zA-Z_-]+)(.*)/); if (!(class in highlight)) - return "Unknown highlight keyword"; + return "Unknown highlight keyword: " + class; let style = highlight[key] || new Highlight(key); styles.removeSheet(style.selector, null, null, null, true); @@ -129,7 +139,7 @@ function Highlights(name, store, serial) .split("\n").filter(function (s) /\S/.test(s)) .forEach(function (style) { - style = Highlight.apply(Highlight, Array.slice(style.match(/^\s*([^,\s]+)(?:,([^,\s]+))?(?:,([^,\s]+))?(?:\s+(.*))?/), 1)); + style = Highlight.apply(Highlight, Array.slice(style.match(/^\s*([^,\s]+)(?:,([^,\s]+))?(?:,([^,\s]+))?\s*(.*)$/), 1)); highlight[style.class] = style; self.set(style.class); }); diff --git a/content/tabs.js b/content/tabs.js index 8da4df9b..793d76a7 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -754,7 +754,7 @@ function Tabs() //{{{ items.* += {number} - {indicator} + {indicator} {title} {item[1]} ; diff --git a/content/ui.js b/content/ui.js index 02871b39..8d711d45 100644 --- a/content/ui.js +++ b/content/ui.js @@ -1323,10 +1323,10 @@ function ItemList(id) //{{{ XML.ignoreWhitespace = true; let row = -