From d8caefc53e785b5229462bef75f73a1214f2d572 Mon Sep 17 00:00:00 2001 From: Nelo Wallus Date: Fri, 15 Jan 2016 15:04:57 +0100 Subject: [PATCH] Add descriptions --- plugins/contrib/treestyletabs.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/plugins/contrib/treestyletabs.js b/plugins/contrib/treestyletabs.js index 78602797..a1b73c51 100644 --- a/plugins/contrib/treestyletabs.js +++ b/plugins/contrib/treestyletabs.js @@ -22,6 +22,13 @@ var INFO = [ "project", { name: "Pentadactyl", "min-version": "1.0" } ], + [ + "p", {}, + "A set of commands to be able to properly use TreeStyleTabs with pentadactyl. ", + "Please note that the functions tend to be slow when mapped to keys (this is a ", + "general problem), so if it's too slow for you copy this script and insert the ", + "binds you want in the empty quotes in every create_command_and_mapping(). " + ] ]; // pass true to close, false to open @@ -57,10 +64,22 @@ function fold_collapse_expand_toggle(children = false) { ); } +function info_add_description(tags, description) { + INFO = INFO.concat( + [ + "item", {}, + ["tags", {}, tags], + ["spec", {}, tags], + ["description", {}, ["p", {}, description ]] + ] + ); +} + function create_command_and_mapping(command, description, funcref, mapping, command_option = {}) { group.commands.add([command], description, funcref, command_option, true ); if (mapping != "") group.mappings.add([modes.NORMAL], [mapping], description, funcref); + info_add_description(":" + command + " " + mapping, description); } create_command_and_mapping(