mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-30 13:55:51 +01:00
Add 'pageinfo'=e.
This commit is contained in:
@@ -19,6 +19,24 @@ var Buffer = Module("buffer", {
|
|||||||
this.evaluateXPath = util.evaluateXPath;
|
this.evaluateXPath = util.evaluateXPath;
|
||||||
this.pageInfo = {};
|
this.pageInfo = {};
|
||||||
|
|
||||||
|
this.addPageInfoSection("e", "Search Engines", function (verbose) {
|
||||||
|
|
||||||
|
let n = 1;
|
||||||
|
let nEngines = 0;
|
||||||
|
for (let { document: doc } in values(buffer.allFrames())) {
|
||||||
|
let engines = util.evaluateXPath(["link[@href and @rel='search' and @type='application/opensearchdescription+xml']"], doc);
|
||||||
|
nEngines += engines.snapshotLength;
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
for (let link in engines)
|
||||||
|
yield [link.title || /*L*/ "Engine " + n++,
|
||||||
|
<a xmlns={XHTML} href={link.href} onclick="window.external.AddSearchProvider(this.href); return false;">{link.href}</a>];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!verbose && nEngines)
|
||||||
|
yield nEngines + /*L*/" engine" + (nEngines > 1 ? "s" : "");
|
||||||
|
});
|
||||||
|
|
||||||
this.addPageInfoSection("f", "Feeds", function (verbose) {
|
this.addPageInfoSection("f", "Feeds", function (verbose) {
|
||||||
const feedTypes = {
|
const feedTypes = {
|
||||||
"application/rss+xml": "RSS",
|
"application/rss+xml": "RSS",
|
||||||
@@ -1887,7 +1905,7 @@ var Buffer = Module("buffer", {
|
|||||||
|
|
||||||
options.add(["pageinfo", "pa"],
|
options.add(["pageinfo", "pa"],
|
||||||
"Define which sections are shown by the :pageinfo command",
|
"Define which sections are shown by the :pageinfo command",
|
||||||
"charlist", "gsfm",
|
"charlist", "gesfm",
|
||||||
{ get values() values(buffer.pageInfo).toObject() });
|
{ get values() values(buffer.pageInfo).toObject() });
|
||||||
|
|
||||||
options.add(["scroll", "scr"],
|
options.add(["scroll", "scr"],
|
||||||
|
|||||||
@@ -1128,6 +1128,7 @@
|
|||||||
|
|
||||||
<dl dt="width: 6em;">
|
<dl dt="width: 6em;">
|
||||||
<dt>g</dt> <dd>General info</dd>
|
<dt>g</dt> <dd>General info</dd>
|
||||||
|
<dt>e</dt> <dd>Search Engines</dd>
|
||||||
<dt>f</dt> <dd>Feeds</dd>
|
<dt>f</dt> <dd>Feeds</dd>
|
||||||
<dt>m</dt> <dd>Meta tags</dd>
|
<dt>m</dt> <dd>Meta tags</dd>
|
||||||
<dt>s</dt> <dd>Security information</dd>
|
<dt>s</dt> <dd>Security information</dd>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
- Added several new options, including -javascript, to :abbreviate and
|
- Added several new options, including -javascript, to :abbreviate and
|
||||||
:map. [b2]
|
:map. [b2]
|
||||||
- Added :mksyntax command to auto-generate Vim syntax files. [b4]
|
- Added :mksyntax command to auto-generate Vim syntax files. [b4]
|
||||||
- Added 's' flag to :pageinfo command. [b7]
|
- Added 's' and 'e' flags to :pageinfo command. [b7]
|
||||||
- Added :pintab and :unpintab commands. [b7]
|
- Added :pintab and :unpintab commands. [b7]
|
||||||
- :open now only opens files beginning with /, ./, ../, or ~/ [b1]
|
- :open now only opens files beginning with /, ./, ../, or ~/ [b1]
|
||||||
- :saveas now provides completions for default file names, and
|
- :saveas now provides completions for default file names, and
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
specially. Use "." instead. [b2]
|
specially. Use "." instead. [b2]
|
||||||
- 'extendedhinttags' is now a [regexpmap] rather than a
|
- 'extendedhinttags' is now a [regexpmap] rather than a
|
||||||
string. [b2]
|
string. [b2]
|
||||||
- 'guioptions' default value has changed. [b4]
|
- 'guioptions' default value has changed. [b4][b7]
|
||||||
- 'hinttags' and 'extendedhinttags' now treat their values as
|
- 'hinttags' and 'extendedhinttags' now treat their values as
|
||||||
CSS selectors by default. [b6]
|
CSS selectors by default. [b6]
|
||||||
- 'incsearch', 'hlsearch', 'ignorecase', and 'smartcase' have
|
- 'incsearch', 'hlsearch', 'ignorecase', and 'smartcase' have
|
||||||
|
|||||||
Reference in New Issue
Block a user