mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 23:02:27 +01:00
*** empty log message ***
This commit is contained in:
@@ -1080,7 +1080,9 @@ const liberator = (function () //{{{
|
||||
{
|
||||
var files = liberator.io.readDirectory(pluginDir.path);
|
||||
liberator.log("Sourcing plugin directory...", 3);
|
||||
files.sort(function (a, b) String(a.path).localeCompare(b.path)).forEach(function (file) {
|
||||
files.sort(function (a, b) String.localeCompare(a.path, b.path))
|
||||
.forEach(function (file)
|
||||
{
|
||||
if (!file.isDirectory() && /\.(js|vimp)$/i.test(file.path))
|
||||
liberator.io.source(file.path, false);
|
||||
});
|
||||
|
||||
@@ -707,16 +707,7 @@ liberator.CommandLine = function () //{{{
|
||||
|
||||
// sort the completion list
|
||||
if (/\bsort\b/.test(liberator.options["wildoptions"]))
|
||||
{
|
||||
completions.sort(function (a, b) {
|
||||
if (a[0] < b[0])
|
||||
return -1;
|
||||
else if (a[0] > b[0])
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
completions.sort(function (a, b) String.localeCompare(a[0], b[0]));
|
||||
|
||||
if (hasList)
|
||||
completionList.setItems(completions, -1);
|
||||
@@ -1312,7 +1303,7 @@ liberator.ItemList = function (id) //{{{
|
||||
|
||||
clear: function () { this.setItems([]); doc.body.innerHTML = ""; },
|
||||
hide: function () { container.collapsed = true; },
|
||||
show: function () { container.collapsed = false; },
|
||||
show: function () { container.collapsed = false; this.selectItem(0); /* fixme? */ },
|
||||
visible: function () { return !container.collapsed; },
|
||||
|
||||
setItems: function (items, selectedItem)
|
||||
@@ -1478,9 +1469,7 @@ liberator.StatusLine = function () //{{{
|
||||
}
|
||||
else
|
||||
{
|
||||
var matches = url.match(/^chrome:\/\/vimperator\/locale\/(\S+)$/);
|
||||
if (matches && matches[1])
|
||||
url = matches[1] + " [Help]";
|
||||
url = url.replace(new RegExp("^chrome://" + liberator.config.name.toLowerCase() + "/locale/(\\S+)\\.html$"), "$1 [Help]");
|
||||
}
|
||||
|
||||
// when session information is available, add [+] when we can go backwards
|
||||
|
||||
@@ -287,14 +287,18 @@ liberator.util = { //{{{
|
||||
{
|
||||
var urls = str.split(new RegExp("\s*" + liberator.options["urlseparator"] + "\s*"));
|
||||
|
||||
begin: for (let url = 0; url < urls.length; url++)
|
||||
for (let url = 0; url < urls.length; url++)
|
||||
{
|
||||
var file = liberator.io.getFile(urls[url]);
|
||||
if (file.exists() && file.isReadable())
|
||||
try
|
||||
{
|
||||
urls[url] = file.path;
|
||||
continue;
|
||||
var file = liberator.io.getFile(urls[url]);
|
||||
if (file.exists() && file.isReadable())
|
||||
{
|
||||
urls[url] = file.path;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
// strip each 'URL' - makes things simpler later on
|
||||
urls[url] = urls[url].replace(/^\s+/, "").replace(/\s+$/, "");
|
||||
|
||||
Reference in New Issue
Block a user