From 85ecff4957f7dfe5cf20270a1ff12fdc4ea175d0 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 12 Aug 2008 17:55:47 +0000 Subject: [PATCH] move the help files list to Vimperator's liberator.config --- content/liberator.js | 12 ++---------- content/vimperator.js | 8 ++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/content/liberator.js b/content/liberator.js index 781eec28..f9769525 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -377,16 +377,7 @@ const liberator = (function () //{{{ function getHelpCompletions(filter) { - var res = []; - // they are sorted by relevance, not alphabetically - // TODO: move files to liberator.config - var files = ["intro.html", "tutorial.html", "starting.html", - "browsing.html", "buffer.html", "pattern.html", "options.html", - "tabs.html", "hints.html", "map.html", "eval.html", "marks.html", - "repeat.html", "autocommands.html", "print.html", "developer.html", - "various.html"]; - - for (var file in files) + for (var file in liberator.config.helpFiles) { try { @@ -399,6 +390,7 @@ const liberator = (function () //{{{ liberator.log("Error opening chrome://" + liberator.config.name.toLowerCase() + "/locale/" + files[file], 1); continue; } + var res = []; var doc = xmlhttp.responseXML; var elems = doc.getElementsByClassName("tag"); for (var i = 0; i < elems.length; i++) diff --git a/content/vimperator.js b/content/vimperator.js index a838bff1..e211c176 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -95,6 +95,14 @@ liberator.config = { //{{{ function () { liberator.buffer.viewSelectionSource(); }] ], + // they are sorted by relevance, not alphabetically + helpFiles: ["intro.html", "tutorial.html", "starting.html", + "browsing.html", "buffer.html", "pattern.html", "options.html", + "tabs.html", "hints.html", "map.html", "eval.html", "marks.html", + "repeat.html", "autocommands.html", "print.html", "developer.html", + "various.html" + ], + init: function () { function incrementURL(count)