mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 12:42:26 +01:00
fix some arg redeclarations
This commit is contained in:
@@ -496,15 +496,14 @@ liberator.Bookmarks = function () //{{{
|
|||||||
if (openItems)
|
if (openItems)
|
||||||
return liberator.open([i[0] for each (i in items)], liberator.NEW_TAB);
|
return liberator.open([i[0] for each (i in items)], liberator.NEW_TAB);
|
||||||
|
|
||||||
var title, url, tags, keyword, extra;
|
|
||||||
var list = ":" + liberator.util.escapeHTML(liberator.commandline.getCommand()) + "<br/>" +
|
var list = ":" + liberator.util.escapeHTML(liberator.commandline.getCommand()) + "<br/>" +
|
||||||
"<table><tr class=\"hl-Title\" align=\"left\"><th>title</th><th>URL</th></tr>";
|
"<table><tr class=\"hl-Title\" align=\"left\"><th>title</th><th>URL</th></tr>";
|
||||||
for (let i = 0; i < items.length; i++)
|
for (let i = 0; i < items.length; i++)
|
||||||
{
|
{
|
||||||
title = liberator.util.escapeHTML(liberator.util.clip(items[i][1], 50));
|
let title = liberator.util.escapeHTML(liberator.util.clip(items[i][1], 50));
|
||||||
url = liberator.util.escapeHTML(items[i][0]);
|
let url = liberator.util.escapeHTML(items[i][0]);
|
||||||
keyword = items[i][2];
|
let keyword = items[i][2];
|
||||||
tags = items[i][3].join(", ");
|
let tags = items[i][3].join(", ");
|
||||||
|
|
||||||
extra = "";
|
extra = "";
|
||||||
if (keyword)
|
if (keyword)
|
||||||
|
|||||||
@@ -1368,7 +1368,8 @@ liberator.Buffer = function () //{{{
|
|||||||
// url is optional
|
// url is optional
|
||||||
viewSource: function (url, useExternalEditor)
|
viewSource: function (url, useExternalEditor)
|
||||||
{
|
{
|
||||||
var url = url || liberator.buffer.URL;
|
url = url || liberator.buffer.URL;
|
||||||
|
|
||||||
if (useExternalEditor)
|
if (useExternalEditor)
|
||||||
{
|
{
|
||||||
// TODO: make that a helper function
|
// TODO: make that a helper function
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ liberator.Commands = function () //{{{
|
|||||||
|
|
||||||
addUserCommand: function (names, description, action, extra, replace)
|
addUserCommand: function (names, description, action, extra, replace)
|
||||||
{
|
{
|
||||||
var extra = extra || {};
|
extra = extra || {};
|
||||||
extra.isUserCommand = true;
|
extra.isUserCommand = true;
|
||||||
description = description || "User defined command";
|
description = description || "User defined command";
|
||||||
|
|
||||||
|
|||||||
@@ -151,8 +151,8 @@ liberator.Editor = function () //{{{
|
|||||||
// mode = "i" -> add :iabbrev, :iabclear and :iunabbrev commands
|
// mode = "i" -> add :iabbrev, :iabclear and :iunabbrev commands
|
||||||
function addAbbreviationCommands(ch, modeDescription)
|
function addAbbreviationCommands(ch, modeDescription)
|
||||||
{
|
{
|
||||||
var modeDescription = modeDescription ? " in " + modeDescription + " mode" : "";
|
|
||||||
var mode = ch || "!";
|
var mode = ch || "!";
|
||||||
|
modeDescription = modeDescription ? " in " + modeDescription + " mode" : "";
|
||||||
|
|
||||||
liberator.commands.add([ch ? ch + "a[bbrev]" : "ab[breviate]"],
|
liberator.commands.add([ch ? ch + "a[bbrev]" : "ab[breviate]"],
|
||||||
"Abbreviate a key sequence" + modeDescription,
|
"Abbreviate a key sequence" + modeDescription,
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ liberator.Mappings = function () //{{{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var modeDescription = modeDescription ? " in " + modeDescription + " mode" : "";
|
modeDescription = modeDescription ? " in " + modeDescription + " mode" : "";
|
||||||
|
|
||||||
liberator.commands.add([ch ? ch + "m[ap]" : "map"],
|
liberator.commands.add([ch ? ch + "m[ap]" : "map"],
|
||||||
"Map a key sequence" + modeDescription,
|
"Map a key sequence" + modeDescription,
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ liberator.Option = function (names, description, type, defaultValue, extraInfo)
|
|||||||
|
|
||||||
if (this.setter)
|
if (this.setter)
|
||||||
{
|
{
|
||||||
var tmpValue = newValue;
|
let tmpValue = newValue;
|
||||||
var newValue = this.setter.call(this, newValue);
|
newValue = this.setter.call(this, newValue);
|
||||||
|
|
||||||
if (typeof newValue == "undefined")
|
if (typeof newValue == "undefined")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user