// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
-// Copyright (c) 2008-2011 by Kris Maglione <maglione.k@gmail.com>
+// Copyright (c) 2008-2012 Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
* Returns a list of QuickMarks associates with the given URL.
*
* @param {string} url The url to find QuickMarks for.
- * @return {[string]}
+ * @returns {[string]}
*/
find: function find(url) {
let res = [];
*/
list: function list(filter) {
let marks = [k for ([k, v] in this._qmarks)];
- let lowercaseMarks = marks.filter(function (x) /[a-z]/.test(x)).sort();
- let uppercaseMarks = marks.filter(function (x) /[A-Z]/.test(x)).sort();
- let numberMarks = marks.filter(function (x) /[0-9]/.test(x)).sort();
+ let lowercaseMarks = marks.filter(bind("test", /[a-z]/)).sort();
+ let uppercaseMarks = marks.filter(bind("test", /[A-Z]/)).sort();
+ let numberMarks = marks.filter(bind("test", /[0-9]/)).sort();
marks = Array.concat(lowercaseMarks, uppercaseMarks, numberMarks);
}
}, {
}, {
- commands: function () {
+ commands: function initCommands() {
commands.add(["delqm[arks]"],
"Delete the specified QuickMarks",
function (args) {
context.fork("current", 0, this, function (context) {
context.title = ["Extra Completions"];
context.completions = [
- [quickmarks.get(args[0]), "Current Value"]
+ [quickmarks.get(args[0]), _("option.currentValue")]
].filter(function ([k, v]) k);
});
context.fork("url", 0, completion, "url");
completer: function (context) completion.quickmark(context),
});
},
- completion: function () {
+ completion: function initCompletion() {
completion.quickmark = function (context) {
context.title = ["QuickMark", "URL"];
context.generate = function () Iterator(quickmarks._qmarks);
};
},
- mappings: function () {
+ mappings: function initMappings() {
var myModes = config.browserModes;
mappings.add(myModes,