From daa0199774812239d59d34f8e9ae0d2dba80d02c Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 3 Dec 2010 20:35:31 -0500 Subject: [PATCH] Moderately different (and probably jarring) :*usage definition information. --- common/content/configbase.js | 5 +++++ common/modules/highlight.jsm | 2 +- common/modules/template.jsm | 14 +++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/common/content/configbase.js b/common/content/configbase.js index 9508eb98..ddd06762 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -232,6 +232,11 @@ const ConfigBase = Class(ModuleBase, { Keyword color: red; Tag color: blue; + Usage + LineInfo + Usage>LineInfo display: none; + Usage:hover>LineInfo display: inline; + !StatusLine color: white !important; background: black !important StatusLineBroken color: black !important; background: #FFa0a0 !important /* light-red */ StatusLineSecure color: black !important; background: #a0a0FF !important /* light-blue */ diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index 44ac3a04..171f6ee4 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -148,7 +148,7 @@ const Highlights = Module("Highlight", { */ selector: function (class_) let (self = this) - class_.replace(/(^|\s)([A-Z]\w+)\b/g, + class_.replace(/(^|[>\s])([A-Z]\w+)\b/g, function (m, n1, hl) n1 + (self.highlight[hl] && self.highlight[hl].class != class_ ? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]")), diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 7a64ce5f..84d7a0dc 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -294,12 +294,16 @@ const Template = Module("Template", { { this.map(iter, function (item) - { + { let (name = item.name || item.names[0], frame = item.definedAt) - frame ? {name} + frame ? <>{name}  + + Defined at { + frame.filename + ":" + frame.lineNumber} + + : name } {item.description}