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)