mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 00:17:58 +01:00
delete unused getCurrentLinkLocation() - moved to wiki
This commit is contained in:
@@ -1302,20 +1302,6 @@ function yankCurrentSelection()
|
|||||||
vimperator.echo("Yanked " + sel);
|
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 ///////////////////////
|
// high level bookmark/history related functions ///////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////{{{
|
||||||
@@ -1537,6 +1523,7 @@ function zoom_to(value)
|
|||||||
vimperator.echo("Zoom value: " + value + "%");
|
vimperator.echo("Zoom value: " + value + "%");
|
||||||
}
|
}
|
||||||
//}}}
|
//}}}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// misc helper functions ////////////////////////////////////////////{{{
|
// misc helper functions ////////////////////////////////////////////{{{
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
@@ -1548,6 +1535,27 @@ function copyToClipboard(str)
|
|||||||
clipboardHelper.copyString(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()
|
Vimperator.prototype.beep = function()
|
||||||
{
|
{
|
||||||
if (!vimperator.options["beep"])
|
if (!vimperator.options["beep"])
|
||||||
@@ -1660,27 +1668,6 @@ Vimperator.prototype.source = function(filename, silent)
|
|||||||
vimperator.echoerr(e);
|
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:
|
// vim: set fdm=marker sw=4 ts=4 et:
|
||||||
|
|||||||
Reference in New Issue
Block a user