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

delete unused getCurrentLinkLocation() - moved to wiki

This commit is contained in:
Doug Kearns
2007-07-02 15:06:12 +00:00
parent 39878db0da
commit f610861aa2

View File

@@ -1302,20 +1302,6 @@ function yankCurrentSelection()
vimperator.echo("Yanked " + sel);
}
// return null, if no link with a href focused
function getCurrentLinkLocation()
{
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
if (window == ww.activeWindow && document.commandDispatcher.focusedElement)
{
var url = document.commandDispatcher.focusedElement.href;
if (url)
return url;
}
return null;
}
////////////////////////////////////////////////////////////////////////
// high level bookmark/history related functions ///////////////////////
/////////////////////////////////////////////////////////////////////{{{
@@ -1537,6 +1523,7 @@ function zoom_to(value)
vimperator.echo("Zoom value: " + value + "%");
}
//}}}
////////////////////////////////////////////////////////////////////////
// misc helper functions ////////////////////////////////////////////{{{
////////////////////////////////////////////////////////////////////////
@@ -1548,6 +1535,27 @@ function copyToClipboard(str)
clipboardHelper.copyString(str);
}
// returns an XPathResult object
function evaluateXPath(expression, doc, ordered)
{
if (!doc)
doc = window.content.document;
var res = doc.evaluate(expression, doc,
function lookupNamespaceURI(prefix) {
switch (prefix) {
case 'xhtml':
return 'http://www.w3.org/1999/xhtml';
default:
return null;
}
},
ordered ? XPathResult.ORDERED_NODE_SNAPSHOT_TYPE : XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null
);
return res;
}
Vimperator.prototype.beep = function()
{
if (!vimperator.options["beep"])
@@ -1660,27 +1668,6 @@ Vimperator.prototype.source = function(filename, silent)
vimperator.echoerr(e);
}
}
// returns an XPathResult object
function evaluateXPath(expression, doc, ordered)
{
if (!doc)
doc = window.content.document;
var res = doc.evaluate(expression, doc,
function lookupNamespaceURI(prefix) {
switch (prefix) {
case 'xhtml':
return 'http://www.w3.org/1999/xhtml';
default:
return null;
}
},
ordered ? XPathResult.ORDERED_NODE_SNAPSHOT_TYPE : XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null
);
return res;
}
//}}}
// vim: set fdm=marker sw=4 ts=4 et: