1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 14:27:58 +01:00

add "s" and "a" mappings to extended hints mode for saving hint targets

This commit is contained in:
Doug Kearns
2007-10-09 12:51:38 +00:00
parent 47d351e44b
commit 79eb375e68
3 changed files with 36 additions and 2 deletions

View File

@@ -467,6 +467,8 @@ function Hints() //{{{
};
// TODO: move these functions somewhere more general
// this function 'click' an element, which also works
// for javascript links
this.openHints = function(new_tab, new_window)
@@ -561,6 +563,28 @@ function Hints() //{{{
vimperator.echo("Yanked " + loc);
};
this.saveHints = function(skip_prompt)
{
var elems = this.hintedElements();
for (var i = 0; i < elems.length; i++)
{
var doc = elems[i].ownerDocument;
var url = makeURLAbsolute(elems[i].refElem.baseURI, elems[i].refElem.href);
var text = elems[i].refElem.textContent;
try
{
urlSecurityCheck(url, doc.location.href);
saveURL(url, text, null, true, skip_prompt, makeURI(url, doc.characterSet));
}
catch (e)
{
vimperator.echoerr(e);
}
}
}
function setMouseOverElement(elem)
{
var doc = window.document;