mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-06 19:25:46 +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
|
||||
{
|
||||
// TODO: why are these sorts of properties arrays? --djk
|
||||
let dialogs = config.dialogs;
|
||||
|
||||
for (let i = 0; i < dialogs.length; i++)
|
||||
for (let [,dialog] in Iterator(dialogs))
|
||||
{
|
||||
if (dialogs[i][0] == arg)
|
||||
return dialogs[i][2]();
|
||||
if (arg == dialog[0])
|
||||
{
|
||||
dialog[2]();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
liberator.echoerr("E475: Invalid argument: " + arg);
|
||||
|
||||
Reference in New Issue
Block a user