mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 18:47:58 +01:00
Add a Map#isUserMap property.
This is symmetrical with Command#isUserCommand although both should probably be renamed #user given the other property names.
This commit is contained in:
@@ -370,11 +370,11 @@ function Commands() //{{{
|
||||
return [len - str.length, arg, quote];
|
||||
}
|
||||
|
||||
function addCommand(command, isUserCommand, replace)
|
||||
function addCommand(command, replace)
|
||||
{
|
||||
if (exCommands.some(function (c) c.hasName(command.name)))
|
||||
{
|
||||
if (isUserCommand && replace)
|
||||
if (command.isUserCommand && replace)
|
||||
commands.removeUserCommand(command.name);
|
||||
else
|
||||
{
|
||||
@@ -472,7 +472,7 @@ function Commands() //{{{
|
||||
*/
|
||||
add: function (names, description, action, extra)
|
||||
{
|
||||
return addCommand(new Command(names, description, action, extra), false, false);
|
||||
return addCommand(new Command(names, description, action, extra), false);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -493,7 +493,7 @@ function Commands() //{{{
|
||||
extra.isUserCommand = true;
|
||||
description = description || "User defined command";
|
||||
|
||||
return addCommand(new Command(names, description, action, extra), true, replace);
|
||||
return addCommand(new Command(names, description, action, extra), replace);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user