mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 14:18:00 +01:00
added Y command
This commit is contained in:
@@ -409,7 +409,7 @@ var g_commands = [/*{{{*/
|
||||
["tabo[nly]"],
|
||||
"Close all other tabs",
|
||||
null,
|
||||
function() { vimperator.tabs.removeAllOthers(getBrowser().mCurrentTab); },
|
||||
function() { vimperator.tabs.keepOnly(getBrowser().mCurrentTab); },
|
||||
null
|
||||
],
|
||||
[
|
||||
@@ -676,6 +676,14 @@ var g_mappings = [/*{{{*/
|
||||
"Under UNIX the location is also put into the selection, which can be pasted with the middle mouse button.",
|
||||
yankCurrentLocation
|
||||
],
|
||||
[
|
||||
["Y"],
|
||||
["Y"],
|
||||
"Copy selected text",
|
||||
"The currently selected text is copied to the system clipboard.",
|
||||
yankCurrentSelection,
|
||||
null
|
||||
],
|
||||
[
|
||||
["zi", "+"],
|
||||
["zi", "+"],
|
||||
@@ -1509,6 +1517,12 @@ function yankCurrentLocation()
|
||||
copyToClipboard(loc);
|
||||
vimperator.echo("Yanked " + loc);
|
||||
}
|
||||
function yankCurrentSelection()
|
||||
{
|
||||
var sel = window.content.document.getSelection();
|
||||
copyToClipboard(sel);
|
||||
vimperator.echo("Yanked " + sel);
|
||||
}
|
||||
|
||||
// return null, if no link with a href focused
|
||||
function getCurrentLinkLocation()
|
||||
|
||||
Reference in New Issue
Block a user