diff --git a/chrome/content/vimperator/buffers.js b/chrome/content/vimperator/buffers.js index cb92fea7..995d4738 100644 --- a/chrome/content/vimperator/buffers.js +++ b/chrome/content/vimperator/buffers.js @@ -138,6 +138,28 @@ function Buffer() //{{{ return window.content.document.title; }); + // returns an XPathResult object + this.evaluateXPath = function(expression, doc, ordered) + { + if (!doc) + doc = window.content.document; + + var result = 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 result; + } + // TODO: move to v.buffers.list() this.list = function(fullmode) { diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index bd24d332..d8b3bc7f 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -1237,12 +1237,12 @@ function Commands() //{{{ //}}} } //}}} -/* takes a string like 'google bla, www.osnews.com' - * and returns an array ['www.google.com/search?q=bla', 'www.osnews.com'] - */ -String.prototype.toURLArray = function() +// takes a string like 'google bla, www.osnews.com' +// and returns an array ['www.google.com/search?q=bla', 'www.osnews.com'] +String.prototype.toURLArray = function() // {{{ { var urls = this.split(/\s*\,\s+/); + begin: for (var url = 0; url < urls.length; url++) { // FIXME: not really that good (doesn't handle .. in the middle), also problems with trailing slashes @@ -1311,33 +1311,8 @@ String.prototype.toURLArray = function() // if we are here let Firefox handle the url and hope it does // something useful with it :) } + return urls; -} - -/////////////////////////////////////////////////////////////////////}}} -// misc helper functions /////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////{{{ - -// 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: diff --git a/chrome/content/vimperator/help.js b/chrome/content/vimperator/help.js index 38bd5a99..e93455de 100644 --- a/chrome/content/vimperator/help.js +++ b/chrome/content/vimperator/help.js @@ -152,7 +152,7 @@ vimperator.help = function(section, easter) //{{{ '
Since Vimperator\'s GUI is embedded into a toolbar, it may look too 3D-like with the default theme. ' + 'For the best experience, I therefore recommend the Whitehart theme or any other flat theme.
\n' + - 'Vimperator was written by Martin Stubenschrott.' + + '
Vimperator was written by Martin Stubenschrott. ' + 'If you appreciate my work on Vimperator and want to encourge me working on it more, you can either send me greetings, patches or make a donation:
\n' + '