1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 03:44:10 +01:00

Fix some functions that used to use args.string.

This commit is contained in:
Kris Maglione
2010-09-29 13:21:01 -04:00
parent 47f5b5e9d9
commit f7b99e9272
9 changed files with 25 additions and 25 deletions

View File

@@ -225,7 +225,7 @@ const Marks = Module("marks", {
"Delete the specified marks",
function (args) {
let special = args.bang;
args = args[0];
args = args[0] || "";
// assert(special ^ args)
dactyl.assert( special || args, "E471: Argument required");
@@ -256,7 +256,7 @@ const Marks = Module("marks", {
commands.add(["ma[rk]"],
"Mark current location within the web page",
function (args) {
let mark = args[0];
let mark = args[0] || "";
dactyl.assert(mark.length <= 1, "E488: Trailing characters");
dactyl.assert(/[a-zA-Z]/.test(mark),
"E191: Argument must be a letter or forward/backward quote");
@@ -268,7 +268,7 @@ const Marks = Module("marks", {
commands.add(["marks"],
"Show all location marks of current web page",
function (args) {
args = args[0];
args = args[0] || "";
// ignore invalid mark characters unless there are no valid mark chars
dactyl.assert(!args || /[a-zA-Z]/.test(args),