mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 20:45:47 +01:00
minor refactoring of :dialog action
This commit is contained in:
committed by
Kris Maglione
parent
b2799ebedd
commit
d277dd5c1c
@@ -232,12 +232,16 @@ const liberator = (function () //{{{
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// TODO: why are these sorts of properties arrays? --djk
|
||||||
let dialogs = config.dialogs;
|
let dialogs = config.dialogs;
|
||||||
|
|
||||||
for (let i = 0; i < dialogs.length; i++)
|
for (let [,dialog] in Iterator(dialogs))
|
||||||
{
|
{
|
||||||
if (dialogs[i][0] == arg)
|
if (arg == dialog[0])
|
||||||
return dialogs[i][2]();
|
{
|
||||||
|
dialog[2]();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
liberator.echoerr("E475: Invalid argument: " + arg);
|
liberator.echoerr("E475: Invalid argument: " + arg);
|
||||||
|
|||||||
Reference in New Issue
Block a user