1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-27 16:43:38 +02:00

Show 'passkeys' state of key chains in :listkeys. Fix linkifyHelp link styling issues. Minor optimization for non-passkeys sites.

This commit is contained in:
Kris Maglione
2011-02-20 10:32:17 -05:00
parent 6317cbc0d8
commit 321296e7e5
3 changed files with 9 additions and 4 deletions
+6 -3
View File
@@ -38,7 +38,8 @@ var ProcessorStack = Class("ProcessorStack", {
}; };
} }
if (!builtin && (!dactyl.focusedElement || events.isContentNode(dactyl.focusedElement))) if (!builtin && options.get("passkeys").hive.values.length
&& (!dactyl.focusedElement || events.isContentNode(dactyl.focusedElement)))
this.processors.unshift(KeyProcessor(modes.BASE, options.get("passkeys").hive)); this.processors.unshift(KeyProcessor(modes.BASE, options.get("passkeys").hive));
}, },
@@ -1539,11 +1540,13 @@ var Events = Module("events", {
pass: set(array.flatten(values.map(function (v) v.keys))), pass: set(array.flatten(values.map(function (v) v.keys))),
stack: MapHive.Stack(values.map(function (v) v.map)) stack: MapHive.Stack(values.map(function (v) v.map)),
values: values
}); });
}, },
has: function (key) set.has(this.hive.pass, key), has: function (key) set.has(this.hive.pass, key) || set.has(this.hive.stack.mappings, key),
get hive() (this.flush(), this.hive), get hive() (this.flush(), this.hive),
+2
View File
@@ -589,6 +589,8 @@ var ConfigBase = Class("ConfigBase", {
helpCSS: UTF8(<><![CDATA[ helpCSS: UTF8(<><![CDATA[
// <css> // <css>
InlineHelpLink font-size: inherit !important; font-family: inherit !important;
Help;;;FontProportional line-height: 1.4em; Help;;;FontProportional line-height: 1.4em;
HelpArg;;;FontCode color: #6A97D4; HelpArg;;;FontCode color: #6A97D4;
+1 -1
View File
@@ -221,7 +221,7 @@ var Template = Module("Template", {
/^\[.*\]$/.test(token) ? "HelpTopic" : /^\[.*\]$/.test(token) ? "HelpTopic" :
/^:\w/.test(token) ? "HelpEx" : "HelpKey"); /^:\w/.test(token) ? "HelpEx" : "HelpKey");
return <a highlight={type} tag={topic} href={"dactyl://help-tag/" + topic} dactyl:command="dactyl.help" xmlns:dactyl={NS}>{text || topic}</a>; return <a highlight={"InlineHelpLink " + type} tag={topic} href={"dactyl://help-tag/" + topic} dactyl:command="dactyl.help" xmlns:dactyl={NS}>{text || topic}</a>;
}, },
HelpLink: function (token) { HelpLink: function (token) {
if (!services["dactyl:"].initialized) if (!services["dactyl:"].initialized)