1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:18:00 +01:00

Added liberator.commandline.input() to prompt the user. Added prompt when opening too many tabs.

This commit is contained in:
Kris Maglione
2008-09-10 04:28:11 +00:00
parent 161278a172
commit 4b6c27b1e7
8 changed files with 98 additions and 63 deletions

View File

@@ -242,18 +242,12 @@ liberator.Completion = function () //{{{
{
var wigRegexp = new RegExp("(^" + liberator.options["wildignore"].replace(",", "|", "g") + ")$");
files = files.filter(function (f) {
return f.isDirectory() || !wigRegexp.test(f.leafName);
});
files = files.filter(function (f) f.isDirectory() || !wigRegexp.test(f.leafName))
}
mapped = files.map(function (file) {
return [tail ? file.leafName : (dir + file.leafName), file.isDirectory() ? "Directory" : "File"];
}).sort(function (a, b) {
return a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0;
}).sort(function (a, b) {
return a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0;
});
mapped = files.map(function (file) [tail ? file.leafName : (dir + file.leafName),
file.isDirectory() ? "Directory" : "File"])
.sort(function (a, b) a[1].localeCompare(b[1]) || a[0].localeCompare(b[0]))
}
catch (e)
{