mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 05:57:58 +01:00
whitespace fixes
This commit is contained in:
@@ -110,7 +110,7 @@ liberator.Bookmarks = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
var modes = liberator.config.browserModes || [liberator.modes.NORMAL];
|
var modes = liberator.config.browserModes || [liberator.modes.NORMAL];
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["a"],
|
liberator.mappings.add(modes, ["a"],
|
||||||
"Open a prompt to bookmark the current URL",
|
"Open a prompt to bookmark the current URL",
|
||||||
function ()
|
function ()
|
||||||
@@ -484,8 +484,8 @@ liberator.History = function () //{{{
|
|||||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
const historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"]
|
const historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"]
|
||||||
.getService(Components.interfaces.nsINavHistoryService);
|
.getService(Components.interfaces.nsINavHistoryService);
|
||||||
|
|
||||||
var history = null;
|
var history = null;
|
||||||
|
|
||||||
@@ -807,7 +807,7 @@ liberator.QuickMarks = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// COMMANDS ////////////////////////////////////////////////
|
////////////////////// COMMANDS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.commands.add(["delqm[arks]"],
|
liberator.commands.add(["delqm[arks]"],
|
||||||
"Delete the specified QuickMarks",
|
"Delete the specified QuickMarks",
|
||||||
function (args, special)
|
function (args, special)
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ liberator.Buffer = function () //{{{
|
|||||||
|
|
||||||
liberator.mappings.add(modes, ["gg", "<Home>"],
|
liberator.mappings.add(modes, ["gg", "<Home>"],
|
||||||
"Goto the top of the document",
|
"Goto the top of the document",
|
||||||
function (count) { liberator.buffer.scrollToPercentile(count > 0 ? count : 0); },
|
function (count) { liberator.buffer.scrollToPercentile(count > 0 ? count : 0); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["G", "<End>"],
|
liberator.mappings.add(modes, ["G", "<End>"],
|
||||||
@@ -671,7 +671,7 @@ liberator.Buffer = function () //{{{
|
|||||||
saveLink: function (elem, skipPrompt)
|
saveLink: function (elem, skipPrompt)
|
||||||
{
|
{
|
||||||
var doc = elem.ownerDocument;
|
var doc = elem.ownerDocument;
|
||||||
var url = makeURLAbsolute(elem.baseURI, elem.href);
|
var url = makeURLAbsolute(elem.baseURI, elem.href);
|
||||||
var text = elem.textContent;
|
var text = elem.textContent;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -1084,7 +1084,7 @@ liberator.Buffer = function () //{{{
|
|||||||
}
|
}
|
||||||
|
|
||||||
pageGeneral.push(["Mime-Type", content.document.contentType]);
|
pageGeneral.push(["Mime-Type", content.document.contentType]);
|
||||||
pageGeneral.push(["Encoding", content.document.characterSet]);
|
pageGeneral.push(["Encoding", content.document.characterSet]);
|
||||||
pageGeneral.push(["Compatibility", content.document.compatMode == "BackCompat" ? "Quirks Mode" : "Full/Almost Standards Mode"]);
|
pageGeneral.push(["Compatibility", content.document.compatMode == "BackCompat" ? "Quirks Mode" : "Full/Almost Standards Mode"]);
|
||||||
if (lastModVerbose)
|
if (lastModVerbose)
|
||||||
pageGeneral.push(["Last Modified", lastModVerbose]);
|
pageGeneral.push(["Last Modified", lastModVerbose]);
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ liberator.Completion = function () //{{{
|
|||||||
queryURI = engine.getSubmission(query, responseType).uri.asciiSpec;
|
queryURI = engine.getSubmission(query, responseType).uri.asciiSpec;
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", queryURI, false);
|
xhr.open("GET", queryURI, false);
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
@@ -216,7 +216,7 @@ liberator.Completion = function () //{{{
|
|||||||
completions.push([(matches ? matches[1] : "") + item, name + " suggestion"]);
|
completions.push([(matches ? matches[1] : "") + item, name + " suggestion"]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return [0, completions];
|
return [0, completions];
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -362,14 +362,14 @@ liberator.Completion = function () //{{{
|
|||||||
return [0, buildLongestStartingSubstring(completions, filter)];
|
return [0, buildLongestStartingSubstring(completions, filter)];
|
||||||
},
|
},
|
||||||
|
|
||||||
mail: function (filter)
|
mail: function (filter)
|
||||||
{
|
{
|
||||||
var completions = [];
|
var completions = [];
|
||||||
var folders = liberator.mail.getFolders();
|
var folders = liberator.mail.getFolders();
|
||||||
for (var folder in folders)
|
for (var folder in folders)
|
||||||
{
|
{
|
||||||
completions.push([folders[folder].server.prettyName + ": "
|
completions.push([folders[folder].server.prettyName + ": "
|
||||||
+ folders[folder].name,
|
+ folders[folder].name,
|
||||||
"Unread: " + folders[folder].getNumUnread(false)]);
|
"Unread: " + folders[folder].getNumUnread(false)]);
|
||||||
}
|
}
|
||||||
if (!filter)
|
if (!filter)
|
||||||
@@ -431,7 +431,7 @@ liberator.Completion = function () //{{{
|
|||||||
else
|
else
|
||||||
optionCompletions.push([[prefArray[i]], liberator.options.getPref(prefArray[i])]);
|
optionCompletions.push([[prefArray[i]], liberator.options.getPref(prefArray[i])]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!filter)
|
if (!filter)
|
||||||
return [0, optionCompletions];
|
return [0, optionCompletions];
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ liberator.Editor = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// OPTIONS /////////////////////////////////////////////////
|
////////////////////// OPTIONS /////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.options.add(["editor"],
|
liberator.options.add(["editor"],
|
||||||
"Set the external text editor",
|
"Set the external text editor",
|
||||||
"string", "gvim -f");
|
"string", "gvim -f");
|
||||||
@@ -443,7 +443,7 @@ liberator.Editor = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// COMMANDS ////////////////////////////////////////////////
|
////////////////////// COMMANDS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
addAbbreviationCommands("", "");
|
addAbbreviationCommands("", "");
|
||||||
addAbbreviationCommands("i", "insert");
|
addAbbreviationCommands("i", "insert");
|
||||||
addAbbreviationCommands("c", "command line");
|
addAbbreviationCommands("c", "command line");
|
||||||
@@ -503,7 +503,7 @@ liberator.Editor = function () //{{{
|
|||||||
var tempStr1 = elt.value.substring(0, rangeStart);
|
var tempStr1 = elt.value.substring(0, rangeStart);
|
||||||
var tempStr2 = liberator.util.readFromClipboard();
|
var tempStr2 = liberator.util.readFromClipboard();
|
||||||
var tempStr3 = elt.value.substring(rangeEnd);
|
var tempStr3 = elt.value.substring(rangeEnd);
|
||||||
elt.value = tempStr1 + tempStr2 + tempStr3;
|
elt.value = tempStr1 + tempStr2 + tempStr3;
|
||||||
elt.selectionStart = rangeStart + tempStr2.length;
|
elt.selectionStart = rangeStart + tempStr2.length;
|
||||||
elt.selectionEnd = elt.selectionStart;
|
elt.selectionEnd = elt.selectionStart;
|
||||||
}
|
}
|
||||||
@@ -1012,7 +1012,7 @@ liberator.Editor = function () //{{{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // two abbrev's exists ( 'i' or 'c' (filter as well))
|
else // two abbrev's exists ( 'i' or 'c' (filter as well))
|
||||||
{
|
{
|
||||||
if (abbrev[lhs][0][0] == "c" && filter == "c")
|
if (abbrev[lhs][0][0] == "c" && filter == "c")
|
||||||
abbrev[lhs][0] = abbrev[lhs][1];
|
abbrev[lhs][0] = abbrev[lhs][1];
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ liberator.AutoCommands = function () //{{{
|
|||||||
{
|
{
|
||||||
for (var item in autoCommands)
|
for (var item in autoCommands)
|
||||||
for (var i = 0; i < autoCommands[item].length; i++)
|
for (var i = 0; i < autoCommands[item].length; i++)
|
||||||
yield item + " " + autoCommands[item][i][0] + " " + autoCommands[item][i][1];
|
yield item + " " + autoCommands[item][i][0] + " " + autoCommands[item][i][1];
|
||||||
throw StopIteration;
|
throw StopIteration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,19 +48,19 @@ liberator.AutoCommands = function () //{{{
|
|||||||
|
|
||||||
liberator.commands.add(["au[tocmd]"],
|
liberator.commands.add(["au[tocmd]"],
|
||||||
"Execute commands automatically on events",
|
"Execute commands automatically on events",
|
||||||
function (args, special)
|
function (args, special)
|
||||||
{
|
{
|
||||||
if (!args)
|
if (!args)
|
||||||
{
|
{
|
||||||
if (special) // :au!
|
if (special) // :au!
|
||||||
liberator.autocommands.remove(null, null);
|
liberator.autocommands.remove(null, null);
|
||||||
else // :au
|
else // :au
|
||||||
liberator.autocommands.list(null, null);
|
liberator.autocommands.list(null, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// (?: ) means don't store; (....)? <-> exclamation marks makes the group optional
|
// (?: ) means don't store; (....)? <-> exclamation marks makes the group optional
|
||||||
var [all, asterix, auEvent, regex, cmds] = args.match(/^(\*)?(?:\s+)?(\S+)(?:\s+)?(\S+)?(?:\s+)?(.+)?$/);
|
var [all, asterix, auEvent, regex, cmds] = args.match(/^(\*)?(?:\s+)?(\S+)(?:\s+)?(\S+)?(?:\s+)?(.+)?$/);
|
||||||
|
|
||||||
if (cmds)
|
if (cmds)
|
||||||
{
|
{
|
||||||
@@ -238,17 +238,17 @@ liberator.Events = function () //{{{
|
|||||||
var tabcontainer = getBrowser().mTabContainer;
|
var tabcontainer = getBrowser().mTabContainer;
|
||||||
if (tabcontainer) // not every VIM-like extension has a tab container
|
if (tabcontainer) // not every VIM-like extension has a tab container
|
||||||
{
|
{
|
||||||
tabcontainer.addEventListener("TabMove", function (event)
|
tabcontainer.addEventListener("TabMove", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
liberator.buffer.updateBufferList();
|
||||||
}, false);
|
}, false);
|
||||||
tabcontainer.addEventListener("TabOpen", function (event)
|
tabcontainer.addEventListener("TabOpen", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
liberator.buffer.updateBufferList();
|
||||||
}, false);
|
}, false);
|
||||||
tabcontainer.addEventListener("TabClose", function (event)
|
tabcontainer.addEventListener("TabClose", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
liberator.buffer.updateBufferList();
|
||||||
@@ -546,7 +546,7 @@ liberator.Events = function () //{{{
|
|||||||
liberator.mappings.add([liberator.modes.NORMAL, liberator.modes.VISUAL, liberator.modes.CARET, liberator.modes.INSERT, liberator.modes.TEXTAREA],
|
liberator.mappings.add([liberator.modes.NORMAL, liberator.modes.VISUAL, liberator.modes.CARET, liberator.modes.INSERT, liberator.modes.TEXTAREA],
|
||||||
["<S-Tab>"], "Rewind keyboard focus",
|
["<S-Tab>"], "Rewind keyboard focus",
|
||||||
function () { document.commandDispatcher.rewindFocus(); });
|
function () { document.commandDispatcher.rewindFocus(); });
|
||||||
|
|
||||||
liberator.mappings.add(liberator.modes.all,
|
liberator.mappings.add(liberator.modes.all,
|
||||||
["<C-q>"], "Temporarily ignore all " + liberator.config.name + " key bindings",
|
["<C-q>"], "Temporarily ignore all " + liberator.config.name + " key bindings",
|
||||||
function () { liberator.modes.passAllKeys = true; });
|
function () { liberator.modes.passAllKeys = true; });
|
||||||
@@ -578,7 +578,7 @@ liberator.Events = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// COMMANDS ////////////////////////////////////////////////
|
////////////////////// COMMANDS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.commands.add(["delmac[ros]"],
|
liberator.commands.add(["delmac[ros]"],
|
||||||
"Delete macros",
|
"Delete macros",
|
||||||
function (arg)
|
function (arg)
|
||||||
@@ -596,7 +596,7 @@ liberator.Events = function () //{{{
|
|||||||
var str = "<table>";
|
var str = "<table>";
|
||||||
var macroRef = liberator.events.getMacros(arg);
|
var macroRef = liberator.events.getMacros(arg);
|
||||||
for (var item in macroRef)
|
for (var item in macroRef)
|
||||||
str += "<tr><td> " + item + " </td><td>" +
|
str += "<tr><td> " + item + " </td><td>" +
|
||||||
liberator.util.escapeHTML(macroRef[item]) + "</td></tr>";
|
liberator.util.escapeHTML(macroRef[item]) + "</td></tr>";
|
||||||
|
|
||||||
str += "</table>";
|
str += "</table>";
|
||||||
@@ -689,7 +689,7 @@ liberator.Events = function () //{{{
|
|||||||
if (macros[lastMacro])
|
if (macros[lastMacro])
|
||||||
{
|
{
|
||||||
liberator.modes.isReplaying = true;
|
liberator.modes.isReplaying = true;
|
||||||
|
|
||||||
// make sure the page is stopped before starting to play the macro
|
// make sure the page is stopped before starting to play the macro
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -804,7 +804,7 @@ liberator.Events = function () //{{{
|
|||||||
{
|
{
|
||||||
if (!waitForPageLoaded())
|
if (!waitForPageLoaded())
|
||||||
return;
|
return;
|
||||||
// else // a short break between keys often helps
|
// else // a short break between keys often helps
|
||||||
// liberator.sleep(50);
|
// liberator.sleep(50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1197,7 +1197,7 @@ liberator.Events = function () //{{{
|
|||||||
// return true, with the effect that it also gets to there (for
|
// return true, with the effect that it also gets to there (for
|
||||||
// whatever reason). if that happens to be correct, well..
|
// whatever reason). if that happens to be correct, well..
|
||||||
// XXX: why not just do that as well for HINTS mode actually?
|
// XXX: why not just do that as well for HINTS mode actually?
|
||||||
|
|
||||||
if (liberator.mode == liberator.modes.CUSTOM)
|
if (liberator.mode == liberator.modes.CUSTOM)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -1209,7 +1209,7 @@ liberator.Events = function () //{{{
|
|||||||
else
|
else
|
||||||
map = liberator.mappings.get(liberator.mode, candidateCommand);
|
map = liberator.mappings.get(liberator.mode, candidateCommand);
|
||||||
|
|
||||||
|
|
||||||
// counts must be at the start of a complete mapping (10j -> go 10 lines down)
|
// counts must be at the start of a complete mapping (10j -> go 10 lines down)
|
||||||
if (/^[1-9][0-9]*$/.test(liberator.input.buffer + key))
|
if (/^[1-9][0-9]*$/.test(liberator.input.buffer + key))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ liberator.IO = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// COMMANDS ////////////////////////////////////////////////
|
////////////////////// COMMANDS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.commands.add(["cd", "chd[ir]"],
|
liberator.commands.add(["cd", "chd[ir]"],
|
||||||
"Change the current directory",
|
"Change the current directory",
|
||||||
function (args)
|
function (args)
|
||||||
@@ -135,7 +135,7 @@ liberator.IO = function () //{{{
|
|||||||
|
|
||||||
liberator.io.writeFile(file, line);
|
liberator.io.writeFile(file, line);
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.commands.add(["so[urce]"],
|
liberator.commands.add(["so[urce]"],
|
||||||
"Read Ex commands from a file",
|
"Read Ex commands from a file",
|
||||||
function (args, special)
|
function (args, special)
|
||||||
@@ -477,7 +477,7 @@ lookup:
|
|||||||
var extensions = environmentService.get("PATHEXT").split(";");
|
var extensions = environmentService.get("PATHEXT").split(";");
|
||||||
for (let j = 0; j < extensions.length; j++)
|
for (let j = 0; j < extensions.length; j++)
|
||||||
{
|
{
|
||||||
path = dirs[i] + "\\" + program + extensions[j];
|
path = dirs[i] + "\\" + program + extensions[j];
|
||||||
file.initWithPath(path);
|
file.initWithPath(path);
|
||||||
if (file.exists())
|
if (file.exists())
|
||||||
break lookup;
|
break lookup;
|
||||||
|
|||||||
@@ -87,14 +87,14 @@ const liberator = (function () //{{{
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["verbose", "vbs"],
|
liberator.options.add(["verbose", "vbs"],
|
||||||
"Define which type of messages are logged",
|
"Define which type of messages are logged",
|
||||||
"number", 0,
|
"number", 0,
|
||||||
{
|
{
|
||||||
validator: function (value) { return (value >= 0 && value <= 9); }
|
validator: function (value) { return (value >= 0 && value <= 9); }
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["visualbell", "vb"],
|
liberator.options.add(["visualbell", "vb"],
|
||||||
"Use visual bell instead of beeping on errors",
|
"Use visual bell instead of beeping on errors",
|
||||||
"boolean", false,
|
"boolean", false,
|
||||||
{
|
{
|
||||||
@@ -438,7 +438,7 @@ const liberator = (function () //{{{
|
|||||||
|
|
||||||
triggerCallback: function (type, mode, data)
|
triggerCallback: function (type, mode, data)
|
||||||
{
|
{
|
||||||
// dump("type: " + type + " mode: " + mode + "data: " + data + "\n");
|
// dump("type: " + type + " mode: " + mode + "data: " + data + "\n");
|
||||||
for (var i in callbacks)
|
for (var i in callbacks)
|
||||||
{
|
{
|
||||||
var [thistype, thismode, thisfunc] = callbacks[i];
|
var [thistype, thismode, thisfunc] = callbacks[i];
|
||||||
@@ -698,7 +698,7 @@ const liberator = (function () //{{{
|
|||||||
else if (!where || !liberator.has("tabs"))
|
else if (!where || !liberator.has("tabs"))
|
||||||
where = liberator.CURRENT_TAB;
|
where = liberator.CURRENT_TAB;
|
||||||
|
|
||||||
var url = typeof urls[0] == "string" ? urls[0] : urls[0][0];
|
var url = typeof urls[0] == "string" ? urls[0] : urls[0][0];
|
||||||
var postdata = typeof urls[0] == "string" ? null : urls[0][1];
|
var postdata = typeof urls[0] == "string" ? null : urls[0][1];
|
||||||
var whichwindow = window;
|
var whichwindow = window;
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ const liberator = (function () //{{{
|
|||||||
// all other URLs are always loaded in background
|
// all other URLs are always loaded in background
|
||||||
for (var i = 1; i < urls.length; i++)
|
for (var i = 1; i < urls.length; i++)
|
||||||
{
|
{
|
||||||
url = typeof urls[i] == "string" ? urls[i] : urls[i][0];
|
url = typeof urls[i] == "string" ? urls[i] : urls[i][0];
|
||||||
postdata = typeof urls[i] == "string" ? null : urls[i][1];
|
postdata = typeof urls[i] == "string" ? null : urls[i][1];
|
||||||
whichwindow.getBrowser().addTab(url, null, null, postdata);
|
whichwindow.getBrowser().addTab(url, null, null, postdata);
|
||||||
}
|
}
|
||||||
@@ -843,7 +843,7 @@ const liberator = (function () //{{{
|
|||||||
|
|
||||||
// namespace for plugins/scripts. Actually (only) the active plugin must/can set a
|
// namespace for plugins/scripts. Actually (only) the active plugin must/can set a
|
||||||
// v.plugins.mode = <str> string to show on v.modes.CUSTOM
|
// v.plugins.mode = <str> string to show on v.modes.CUSTOM
|
||||||
// v.plugins.stop = <func> hooked on a v.modes.reset()
|
// v.plugins.stop = <func> hooked on a v.modes.reset()
|
||||||
// v.plugins.onEvent = <func> function triggered, on keypresses (unless <esc>) (see events.js)
|
// v.plugins.onEvent = <func> function triggered, on keypresses (unless <esc>) (see events.js)
|
||||||
liberator.plugins = {};
|
liberator.plugins = {};
|
||||||
|
|
||||||
|
|||||||
@@ -119,12 +119,12 @@ liberator.Mail = function () //{{{
|
|||||||
if (copy)
|
if (copy)
|
||||||
{
|
{
|
||||||
MsgCopyMessage(folders[0].URI);
|
MsgCopyMessage(folders[0].URI);
|
||||||
setTimeout(function () { liberator.echo(count + " message(s) copied to " + folders[0].prettyName); }, 100);
|
setTimeout(function () { liberator.echo(count + " message(s) copied to " + folders[0].prettyName); }, 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MsgMoveMessage(folders[0].URI);
|
MsgMoveMessage(folders[0].URI);
|
||||||
setTimeout(function () { liberator.echo(count + " message(s) moved to " + folders[0].prettyName); }, 100);
|
setTimeout(function () { liberator.echo(count + " message(s) moved to " + folders[0].prettyName); }, 100);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ liberator.Mail = function () //{{{
|
|||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectUnreadFolder(backwards, count)
|
function selectUnreadFolder(backwards, count)
|
||||||
{
|
{
|
||||||
count = (count > 0 ) ? count : 1;
|
count = (count > 0 ) ? count : 1;
|
||||||
var direction = backwards ? -1 : 1;
|
var direction = backwards ? -1 : 1;
|
||||||
@@ -153,19 +153,19 @@ liberator.Mail = function () //{{{
|
|||||||
var c = tree.currentIndex;
|
var c = tree.currentIndex;
|
||||||
var i = direction;
|
var i = direction;
|
||||||
var folder;
|
var folder;
|
||||||
while (count > 0 && (c + i) < tree.view.rowCount && (c + i) >= 0)
|
while (count > 0 && (c + i) < tree.view.rowCount && (c + i) >= 0)
|
||||||
{
|
{
|
||||||
var resource = GetFolderResource(tree, (c + i)).QueryInterface(Components.interfaces.nsIMsgFolder);
|
var resource = GetFolderResource(tree, (c + i)).QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||||
if (!resource.isServer && resource.getNumUnread(false))
|
if (!resource.isServer && resource.getNumUnread(false))
|
||||||
{
|
{
|
||||||
count -= 1;
|
count -= 1;
|
||||||
folder = i;
|
folder = i;
|
||||||
}
|
}
|
||||||
i += direction;
|
i += direction;
|
||||||
}
|
}
|
||||||
if (!folder || count > 0)
|
if (!folder || count > 0)
|
||||||
liberator.beep();
|
liberator.beep();
|
||||||
else
|
else
|
||||||
tree.view.selection.timedSelect(c + folder, tree._selectDelay);
|
tree.view.selection.timedSelect(c + folder, tree._selectDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ liberator.Mail = function () //{{{
|
|||||||
"Select next message, including closed threads",
|
"Select next message, including closed threads",
|
||||||
function (count) { liberator.mail.selectMessage(function (msg) { return true; }, false, true, false, count); },
|
function (count) { liberator.mail.selectMessage(function (msg) { return true; }, false, true, false, count); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["J", "<Tab>"],
|
liberator.mappings.add(modes, ["J", "<Tab>"],
|
||||||
"Select next unread message",
|
"Select next unread message",
|
||||||
function (count) { liberator.mail.selectMessage(function (msg) { return !msg.isRead; }, true, true, false, count); },
|
function (count) { liberator.mail.selectMessage(function (msg) { return !msg.isRead; }, true, true, false, count); },
|
||||||
@@ -273,7 +273,7 @@ liberator.Mail = function () //{{{
|
|||||||
"Select previous message",
|
"Select previous message",
|
||||||
function (count) { liberator.mail.selectMessage(function (msg) { return true; }, false, true, true, count); },
|
function (count) { liberator.mail.selectMessage(function (msg) { return true; }, false, true, true, count); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["K"],
|
liberator.mappings.add(modes, ["K"],
|
||||||
"Select previous unread message",
|
"Select previous unread message",
|
||||||
function (count) { liberator.mail.selectMessage(function (msg) { return !msg.isRead; }, true, true, true, count); },
|
function (count) { liberator.mail.selectMessage(function (msg) { return !msg.isRead; }, true, true, true, count); },
|
||||||
@@ -304,7 +304,7 @@ liberator.Mail = function () //{{{
|
|||||||
catch (e) { liberator.beep(); }
|
catch (e) { liberator.beep(); }
|
||||||
},
|
},
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
|
|
||||||
// SENDING MESSAGES
|
// SENDING MESSAGES
|
||||||
liberator.mappings.add(modes, ["m"],
|
liberator.mappings.add(modes, ["m"],
|
||||||
@@ -313,8 +313,8 @@ liberator.Mail = function () //{{{
|
|||||||
|
|
||||||
liberator.mappings.add(modes, ["M"],
|
liberator.mappings.add(modes, ["M"],
|
||||||
"Compose a new message to the sender of selected mail",
|
"Compose a new message to the sender of selected mail",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var to = escapeRecipient(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor);
|
var to = escapeRecipient(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor);
|
||||||
@@ -360,7 +360,7 @@ liberator.Mail = function () //{{{
|
|||||||
liberator.mappings.add(modes, ["u"],
|
liberator.mappings.add(modes, ["u"],
|
||||||
"Undo",
|
"Undo",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
if (messenger.canUndo())
|
if (messenger.canUndo())
|
||||||
messenger.undo(msgWindow);
|
messenger.undo(msgWindow);
|
||||||
else
|
else
|
||||||
@@ -369,7 +369,7 @@ liberator.Mail = function () //{{{
|
|||||||
liberator.mappings.add(modes, ["<C-r>"],
|
liberator.mappings.add(modes, ["<C-r>"],
|
||||||
"Redo",
|
"Redo",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
if (messenger.canRedo())
|
if (messenger.canRedo())
|
||||||
messenger.redo(msgWindow);
|
messenger.redo(msgWindow);
|
||||||
else
|
else
|
||||||
@@ -455,7 +455,7 @@ liberator.Mail = function () //{{{
|
|||||||
"Go to next mailbox with unread messages",
|
"Go to next mailbox with unread messages",
|
||||||
function (count)
|
function (count)
|
||||||
{
|
{
|
||||||
selectUnreadFolder(false, count)
|
selectUnreadFolder(false, count)
|
||||||
},
|
},
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ liberator.Mail = function () //{{{
|
|||||||
"Go to previous mailbox with unread messages",
|
"Go to previous mailbox with unread messages",
|
||||||
function (count)
|
function (count)
|
||||||
{
|
{
|
||||||
selectUnreadFolder(true, count)
|
selectUnreadFolder(true, count)
|
||||||
},
|
},
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
@@ -692,7 +692,7 @@ liberator.Mail = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// PUBLIC SECTION //////////////////////////////////////////
|
////////////////////// PUBLIC SECTION //////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
get currentAccount() { return this.currentFolder.rootFolder; },
|
get currentAccount() { return this.currentFolder.rootFolder; },
|
||||||
@@ -710,7 +710,7 @@ liberator.Mail = function () //{{{
|
|||||||
params.composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"]
|
params.composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"]
|
||||||
.createInstance(Components.interfaces.nsIMsgCompFields);
|
.createInstance(Components.interfaces.nsIMsgCompFields);
|
||||||
|
|
||||||
if (args)
|
if (args)
|
||||||
{
|
{
|
||||||
if (args.originalMsg)
|
if (args.originalMsg)
|
||||||
params.originalMsgURI = args.originalMsg;
|
params.originalMsgURI = args.originalMsg;
|
||||||
@@ -727,9 +727,9 @@ liberator.Mail = function () //{{{
|
|||||||
if (args.body)
|
if (args.body)
|
||||||
params.composeFields.body = args.body;
|
params.composeFields.body = args.body;
|
||||||
|
|
||||||
if (args.attachments)
|
if (args.attachments)
|
||||||
{
|
{
|
||||||
while (args.attachments.length > 0)
|
while (args.attachments.length > 0)
|
||||||
{
|
{
|
||||||
var url = args.attachments.pop();
|
var url = args.attachments.pop();
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ liberator.Mail = function () //{{{
|
|||||||
.createInstance(Components.interfaces.nsILocalFile);
|
.createInstance(Components.interfaces.nsILocalFile);
|
||||||
file.initWithPath(url);
|
file.initWithPath(url);
|
||||||
|
|
||||||
if (!file.exists())
|
if (!file.exists())
|
||||||
{
|
{
|
||||||
liberator.echoerr("Exxx: Could attach file `" + url + "'", liberator.commandline.FORCE_SINGLELINE);
|
liberator.echoerr("Exxx: Could attach file `" + url + "'", liberator.commandline.FORCE_SINGLELINE);
|
||||||
continue;
|
continue;
|
||||||
@@ -747,10 +747,10 @@ liberator.Mail = function () //{{{
|
|||||||
.createInstance(Components.interfaces.nsIMsgAttachment);
|
.createInstance(Components.interfaces.nsIMsgAttachment);
|
||||||
attachment.url = "file://" + url;
|
attachment.url = "file://" + url;
|
||||||
params.composeFields.addAttachment(attachment);
|
params.composeFields.addAttachment(attachment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
params.type = Components.interfaces.nsIMsgCompType.New
|
params.type = Components.interfaces.nsIMsgCompType.New
|
||||||
|
|
||||||
var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
|
var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
|
||||||
@@ -879,7 +879,7 @@ liberator.Mail = function () //{{{
|
|||||||
var thread = gDBView.db.GetThreadContainingMsgHdr(msg);
|
var thread = gDBView.db.GetThreadContainingMsgHdr(msg);
|
||||||
var originalCount = count;
|
var originalCount = count;
|
||||||
|
|
||||||
for (let j = (i == gDBView.selection.currentIndex && !reverse) ? 1 : (reverse ? thread.numChildren - 1 : 0);
|
for (let j = (i == gDBView.selection.currentIndex && !reverse) ? 1 : (reverse ? thread.numChildren - 1 : 0);
|
||||||
reverse ? (j >= 0) : (j < thread.numChildren);
|
reverse ? (j >= 0) : (j < thread.numChildren);
|
||||||
reverse ? j-- : j++)
|
reverse ? j-- : j++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ liberator.Mappings = function () //{{{
|
|||||||
return matches;
|
return matches;
|
||||||
},
|
},
|
||||||
|
|
||||||
// returns whether the user added a custom user map
|
// returns whether the user added a custom user map
|
||||||
hasMap: function (mode, cmd)
|
hasMap: function (mode, cmd)
|
||||||
{
|
{
|
||||||
return user[mode].some(function (map) { return map.hasName(cmd); });
|
return user[mode].some(function (map) { return map.hasName(cmd); });
|
||||||
@@ -403,13 +403,13 @@ liberator.Mappings = function () //{{{
|
|||||||
var modeSign = "";
|
var modeSign = "";
|
||||||
for (var i = 0; i < modes.length; i++)
|
for (var i = 0; i < modes.length; i++)
|
||||||
{
|
{
|
||||||
if (modes[i] == liberator.modes.NORMAL)
|
if (modes[i] == liberator.modes.NORMAL)
|
||||||
modeSign += "n";
|
modeSign += "n";
|
||||||
if ((modes[i] == liberator.modes.INSERT || modes[i] == liberator.modes.TEXTAREA) && modeSign.indexOf("i") == -1)
|
if ((modes[i] == liberator.modes.INSERT || modes[i] == liberator.modes.TEXTAREA) && modeSign.indexOf("i") == -1)
|
||||||
modeSign += "i";
|
modeSign += "i";
|
||||||
if (modes[i] == liberator.modes.COMMAND_LINE)
|
if (modes[i] == liberator.modes.COMMAND_LINE)
|
||||||
modeSign += "c";
|
modeSign += "c";
|
||||||
if (modes[i] == liberator.modes.MESSAGRE)
|
if (modes[i] == liberator.modes.MESSAGRE)
|
||||||
modeSign += "m";
|
modeSign += "m";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,7 +423,7 @@ liberator.Mappings = function () //{{{
|
|||||||
list += "<tr>";
|
list += "<tr>";
|
||||||
list += "<td> " + modeSign + " " + liberator.util.escapeHTML(maps[i].names[j]) + "</td>";
|
list += "<td> " + modeSign + " " + liberator.util.escapeHTML(maps[i].names[j]) + "</td>";
|
||||||
if (maps[i].rhs)
|
if (maps[i].rhs)
|
||||||
list += "<td> "+ (maps[i].noremap ? "*" : " ") + "</td>"
|
list += "<td> "+ (maps[i].noremap ? "*" : " ") + "</td>"
|
||||||
+ "<td>" + liberator.util.escapeHTML(maps[i].rhs) + "</td>";
|
+ "<td>" + liberator.util.escapeHTML(maps[i].rhs) + "</td>";
|
||||||
list += "</tr>";
|
list += "</tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ liberator.modes = (function () //{{{
|
|||||||
CARET: 1 << 5, // text cursor is visible
|
CARET: 1 << 5, // text cursor is visible
|
||||||
TEXTAREA: 1 << 6, // text cursor is in a HTMLTextAreaElement
|
TEXTAREA: 1 << 6, // text cursor is in a HTMLTextAreaElement
|
||||||
MESSAGE: 1 << 7, // for now only used in Muttator when the message has focus
|
MESSAGE: 1 << 7, // for now only used in Muttator when the message has focus
|
||||||
COMPOSE: 1 << 8,
|
COMPOSE: 1 << 8,
|
||||||
CUSTOM: 1 << 9,
|
CUSTOM: 1 << 9,
|
||||||
// extended modes, can include multiple modes, and even main modes
|
// extended modes, can include multiple modes, and even main modes
|
||||||
EX: 1 << 10,
|
EX: 1 << 10,
|
||||||
@@ -204,7 +204,7 @@ liberator.modes = (function () //{{{
|
|||||||
if (main == liberator.modes.COMMAND_LINE)
|
if (main == liberator.modes.COMMAND_LINE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
liberator.commandline.echo(getModeMessage(), liberator.commandline.HL_MODEMSG,
|
liberator.commandline.echo(getModeMessage(), liberator.commandline.HL_MODEMSG,
|
||||||
liberator.commandline.DISALLOW_MULTILINE);
|
liberator.commandline.DISALLOW_MULTILINE);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ liberator.modes = (function () //{{{
|
|||||||
//if (window.wintype == "msgcompose")
|
//if (window.wintype == "msgcompose")
|
||||||
if (liberator.config.isComposeWindow)
|
if (liberator.config.isComposeWindow)
|
||||||
this.set(liberator.modes.COMPOSE, liberator.modes.NONE, silent);
|
this.set(liberator.modes.COMPOSE, liberator.modes.NONE, silent);
|
||||||
else
|
else
|
||||||
this.set(liberator.modes.NORMAL, liberator.modes.NONE, silent);
|
this.set(liberator.modes.NORMAL, liberator.modes.NONE, silent);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ liberator.Options = function () //{{{
|
|||||||
{
|
{
|
||||||
if (special) // open firefox settings gui dialog
|
if (special) // open firefox settings gui dialog
|
||||||
{
|
{
|
||||||
liberator.open("about:config",
|
liberator.open("about:config",
|
||||||
(liberator.options.newtab &&
|
(liberator.options.newtab &&
|
||||||
(liberator.options.newtab == "all" || liberator.options.newtab.split(",").indexOf("prefs") != -1)) ?
|
(liberator.options.newtab == "all" || liberator.options.newtab.split(",").indexOf("prefs") != -1)) ?
|
||||||
liberator.NEW_TAB : liberator.CURRENT_TAB);
|
liberator.NEW_TAB : liberator.CURRENT_TAB);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ liberator.Tabs = function () //{{{
|
|||||||
////////////////////// OPTIONS /////////////////////////////////////////////////
|
////////////////////// OPTIONS /////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.options.add(["showtabline", "stal"],
|
liberator.options.add(["showtabline", "stal"],
|
||||||
"Control when to show the tab bar of opened web pages",
|
"Control when to show the tab bar of opened web pages",
|
||||||
"number", liberator.config.name == "Vimperator" ? 2 : 0,
|
"number", liberator.config.name == "Vimperator" ? 2 : 0,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -308,11 +308,11 @@ liberator.CommandLine = function () //{{{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["showmode", "smd"],
|
liberator.options.add(["showmode", "smd"],
|
||||||
"Show the current mode in the command line",
|
"Show the current mode in the command line",
|
||||||
"boolean", true);
|
"boolean", true);
|
||||||
|
|
||||||
liberator.options.add(["wildmode", "wim"],
|
liberator.options.add(["wildmode", "wim"],
|
||||||
"Define how command line completion works",
|
"Define how command line completion works",
|
||||||
"stringlist", "list:full",
|
"stringlist", "list:full",
|
||||||
{
|
{
|
||||||
@@ -322,7 +322,7 @@ liberator.CommandLine = function () //{{{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.options.add(["wildoptions", "wop"],
|
liberator.options.add(["wildoptions", "wop"],
|
||||||
"Change how command line completion is done",
|
"Change how command line completion is done",
|
||||||
"stringlist", "",
|
"stringlist", "",
|
||||||
{
|
{
|
||||||
@@ -334,7 +334,7 @@ liberator.CommandLine = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
var modes = [liberator.modes.COMMAND_LINE];
|
var modes = [liberator.modes.COMMAND_LINE];
|
||||||
|
|
||||||
liberator.mappings.add(modes,
|
liberator.mappings.add(modes,
|
||||||
["<Space>"], "Expand command line abbreviation",
|
["<Space>"], "Expand command line abbreviation",
|
||||||
function () { return liberator.editor.expandAbbreviation("c"); },
|
function () { return liberator.editor.expandAbbreviation("c"); },
|
||||||
@@ -347,7 +347,7 @@ liberator.CommandLine = function () //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// COMMANDS ////////////////////////////////////////////////
|
////////////////////// COMMANDS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.commands.add(["ec[ho]"],
|
liberator.commands.add(["ec[ho]"],
|
||||||
"Display a string at the bottom of the window",
|
"Display a string at the bottom of the window",
|
||||||
function (args)
|
function (args)
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ liberator.util = { //{{{
|
|||||||
trans.addDataFlavor("text/unicode");
|
trans.addDataFlavor("text/unicode");
|
||||||
if (clipboard.supportsSelectionClipboard())
|
if (clipboard.supportsSelectionClipboard())
|
||||||
clipboard.getData(trans, clipboard.kSelectionClipboard);
|
clipboard.getData(trans, clipboard.kSelectionClipboard);
|
||||||
else
|
else
|
||||||
clipboard.getData(trans, clipboard.kGlobalClipboard);
|
clipboard.getData(trans, clipboard.kGlobalClipboard);
|
||||||
|
|
||||||
var data = {};
|
var data = {};
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ liberator.config = { //{{{
|
|||||||
guioptions: { m: ["toolbar-menubar"], T: ["nav-bar"], b: ["PersonalToolbar"] },
|
guioptions: { m: ["toolbar-menubar"], T: ["nav-bar"], b: ["PersonalToolbar"] },
|
||||||
|
|
||||||
dialogs: [
|
dialogs: [
|
||||||
["about", "About Firefox",
|
["about", "About Firefox",
|
||||||
function () { openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
function () { openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||||
["addbookmark", "Add bookmark for the current page",
|
["addbookmark", "Add bookmark for the current page",
|
||||||
function () { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }],
|
function () { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }],
|
||||||
@@ -114,7 +114,7 @@ liberator.config = { //{{{
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
////////////////////// MAPPINGS ////////////////////////////////////////////////
|
////////////////////// MAPPINGS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.mappings.add([liberator.modes.NORMAL],
|
liberator.mappings.add([liberator.modes.NORMAL],
|
||||||
["y"], "Yank current location to the clipboard",
|
["y"], "Yank current location to the clipboard",
|
||||||
function () { liberator.util.copyToClipboard(liberator.buffer.URL, true); });
|
function () { liberator.util.copyToClipboard(liberator.buffer.URL, true); });
|
||||||
|
|||||||
Reference in New Issue
Block a user