1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 21:47:59 +01:00

make help.js a seperate file, small indention fixes

This commit is contained in:
Martin Stubenschrott
2007-04-23 11:14:33 +00:00
parent 33418f2473
commit 1ae53ecbf8
5 changed files with 310 additions and 259 deletions

View File

@@ -180,27 +180,6 @@ function completion_select_previous_item()/*{{{*/
}/*}}}*/
function get_file_completions(filter)/*{{{*/
{
g_completions = [];
var match = filter.match(/^(.*[\/\\])(.*?)$/);
var dir;
if (!match || !(dir = match[1])) return [];
var compl = match[2] || '';
var fd = fopen(dir, "<");
if (!fd) return [];
var entries = fd.read();
var delim = fd.path.length == 1 ? '' : (fd.path.search(/\\/) != -1) ? "\\" : "/";
var reg = new RegExp("^" + fd.path + delim + compl);
entries.forEach(function(file) {
if (file.path.search(reg) != -1)
g_completions.push([file.path, '']);
});
return g_completions;
}/*}}}*/
/*
* filter a list of urls
@@ -288,6 +267,32 @@ outer:
return filtered.concat(additional_completions);
}/*}}}*/
function get_file_completions(filter)/*{{{*/
{
g_completions = [];
var match = filter.match(/^(.*[\/\\])(.*?)$/);
var dir;
if (!match || !(dir = match[1]))
return [];
var compl = match[2] || '';
var fd = fopen(dir, "<");
if (!fd)
return [];
var entries = fd.read();
var delim = fd.path.length == 1 ? '' : (fd.path.search(/\\/) != -1) ? "\\" : "/";
var reg = new RegExp("^" + fd.path + delim + compl);
entries.forEach(function(file)
{
if (file.path.search(reg) != -1)
g_completions.push([file.path, '']);
});
return g_completions;
}/*}}}*/
function get_search_completions(filter)/*{{{*/
{
var search_completions = [];