mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-14 12:05:47 +01:00
Settle stupid naming dispute.
This commit is contained in:
@@ -188,7 +188,7 @@ const Bookmarks = Module("bookmarks", {
|
||||
* @returns {nsISearchEngine} The search engine.
|
||||
*/
|
||||
getSearchEngine: function getSearchEngine(alias)
|
||||
this.searchEngines.filter(function (e) e.keyword === alias)[0],
|
||||
array.nth(this.searchEngines, function (e) e.keyword === alias, 0),
|
||||
|
||||
getSearchEngines: deprecated("Please use bookmarks.searchEngines instead", function getSearchEngines() this.searchEngines),
|
||||
/**
|
||||
|
||||
@@ -614,9 +614,8 @@ const Commands = Module("commands", {
|
||||
* any of the command's names.
|
||||
* @returns {Command}
|
||||
*/
|
||||
get: function (name, full) {
|
||||
return this._exMap[name] || !full && this._exCommands.filter(function (cmd) cmd.hasName(name))[0] || null;
|
||||
},
|
||||
get: function (name, full)
|
||||
this._exMap[name] || !full && array.nth(this._exCommands, function (cmd) cmd.hasName(name), 0) || null,
|
||||
|
||||
/**
|
||||
* Returns the user-defined command with matching *name*.
|
||||
@@ -625,9 +624,8 @@ const Commands = Module("commands", {
|
||||
* any of the command's names.
|
||||
* @returns {Command}
|
||||
*/
|
||||
getUserCommand: function (name) {
|
||||
return this._exCommands.filter(function (cmd) cmd.user && cmd.hasName(name))[0] || null;
|
||||
},
|
||||
getUserCommand: function (name)
|
||||
array.nth(this._exCommands, function (cmd) cmd.user && cmd.hasName(name), 0) || null,
|
||||
|
||||
/**
|
||||
* Returns all user-defined commands.
|
||||
|
||||
@@ -432,7 +432,7 @@ const Tabs = Module("tabs", {
|
||||
if (matches)
|
||||
return tabs.select(this.allTabs[parseInt(matches[1], 10) - 1], false);
|
||||
|
||||
matches = array.first(tabs.allTabs, function (t) t.linkedBrowser.lastURI.spec === buffer);
|
||||
matches = array.nth(tabs.allTabs, function (t) t.linkedBrowser.lastURI.spec === buffer, 0);
|
||||
if (matches)
|
||||
return tabs.select(matches, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user