1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 18:07:58 +01:00

inline yankCurrentSelection(), yankCurrentLocation(), goUp()

This commit is contained in:
Doug Kearns
2007-07-05 06:52:10 +00:00
parent 53f647b488
commit 39c2a87392
2 changed files with 29 additions and 33 deletions

View File

@@ -1205,6 +1205,7 @@ function focusNextFrame(count, forward)
return;
// remove all unfocusable frames
// TODO: find a better way to do this
var start = document.commandDispatcher.focusedWindow;
frames = frames.filter(function(frame) {
frame.focus();
@@ -1292,36 +1293,6 @@ function getCurrentTitle()
}
function goUp(count)
{
var gocmd = "";
if (isDirectory(getCurrentLocation()))
gocmd = "../";
else
gocmd = "./";
if (count < 1)
count = 1;
for (var i = 0; i < count - 1; i--)
gocmd += "../";
openURLs(gocmd);
}
function yankCurrentLocation()
{
var loc = getCurrentLocation();
copyToClipboard(loc);
vimperator.echo("Yanked " + loc);
}
function yankCurrentSelection()
{
var sel = window.content.document.getSelection();
copyToClipboard(sel);
vimperator.echo("Yanked " + sel);
}
/////////////////////////////////////////////////////////////////////}}}
// scrolling ///////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////{{{