mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 02:22:26 +01:00
Merge branch 'master' into xulmus
This commit is contained in:
@@ -268,7 +268,7 @@ const liberator = (function () //{{{
|
||||
|
||||
for (let [,dialog] in Iterator(dialogs))
|
||||
{
|
||||
if (arg == dialog[0])
|
||||
if (util.compareIgnoreCase(arg, dialog[0]) == 0)
|
||||
{
|
||||
dialog[2]();
|
||||
return;
|
||||
@@ -285,7 +285,11 @@ const liberator = (function () //{{{
|
||||
{
|
||||
argCount: "1",
|
||||
bang: true,
|
||||
completer: function (context, args) completion.dialog(context)
|
||||
completer: function (context)
|
||||
{
|
||||
context.ignoreCase = true;
|
||||
return completion.dialog(context);
|
||||
}
|
||||
});
|
||||
|
||||
commands.add(["em[enu]"],
|
||||
@@ -1029,11 +1033,11 @@ const liberator = (function () //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in '
|
||||
+ [dir.path.replace(/.plugin$/, "") for each (dir in dirs)].join(",").quote(), 2);
|
||||
liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in "'
|
||||
+ [dir.path.replace(/.plugin$/, "") for each (dir in dirs)].join(",") + '"', 2);
|
||||
|
||||
dirs.forEach(function (dir) {
|
||||
liberator.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3);
|
||||
liberator.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);
|
||||
sourceDirectory(dir);
|
||||
});
|
||||
},
|
||||
@@ -1291,12 +1295,12 @@ const liberator = (function () //{{{
|
||||
setTimeout(function () {
|
||||
|
||||
let init = services.get("environment").get(config.name.toUpperCase() + "_INIT");
|
||||
let rcFile = io.getRCFile("~");
|
||||
|
||||
if (init)
|
||||
liberator.execute(init);
|
||||
else
|
||||
{
|
||||
let rcFile = io.getRCFile("~");
|
||||
|
||||
if (rcFile)
|
||||
io.source(rcFile.path, true);
|
||||
else
|
||||
@@ -1306,7 +1310,7 @@ const liberator = (function () //{{{
|
||||
if (options["exrc"])
|
||||
{
|
||||
let localRCFile = io.getRCFile(io.getCurrentDirectory().path);
|
||||
if (localRCFile)
|
||||
if (localRCFile && !localRCFile.equals(rcFile))
|
||||
io.source(localRCFile.path, true);
|
||||
}
|
||||
|
||||
@@ -1421,16 +1425,24 @@ window.liberator = liberator;
|
||||
// FIXME: Ugly, etc.
|
||||
window.addEventListener("liberatorHelpLink", function (event) {
|
||||
let elem = event.target;
|
||||
|
||||
if (/^(option|mapping|command)$/.test(elem.className))
|
||||
var tag = elem.textContent.replace(/\s.*/, "");
|
||||
if (/^(mapping|command)$/.test(elem.className))
|
||||
tag = tag.replace(/^\d+/, "");
|
||||
if (elem.className == "command")
|
||||
tag = tag.replace(/\[.*?\]/g, "");
|
||||
tag = tag.replace(/\[.*?\]/g, "").replace(/!$/, "");
|
||||
|
||||
if (tag)
|
||||
var page = liberator.findHelp(tag);
|
||||
|
||||
if (page)
|
||||
{
|
||||
elem.href = "chrome://liberator/locale/" + page;
|
||||
},
|
||||
true, true);
|
||||
if (buffer.URL.replace(/#.*/, "") == elem.href.replace(/#.*/, "")) // XXX
|
||||
setTimeout(function () { content.postMessage("fragmentChange", "*"); }, 0);
|
||||
}
|
||||
}, true, true);
|
||||
|
||||
// called when the chrome is fully loaded and before the main window is shown
|
||||
window.addEventListener("load", liberator.startup, false);
|
||||
|
||||
Reference in New Issue
Block a user