1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-30 06:32:27 +01:00

Autogenerate the list of sanitizer items in :h :sanitize.

This commit is contained in:
Štěpán Němec
2011-10-07 09:54:42 +02:00
parent 1b6c979d57
commit 06b12136ec
2 changed files with 16 additions and 19 deletions

View File

@@ -1278,6 +1278,21 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
}</dl>
</overlay>;
});
cache.register("help/privacy.xml", function () {
default xml namespace = NS;
return '<?xml version="1.0"?>\n' +
<overlay xmlns={NS}>
<dl insertafter="sanitize-items">{
template.map(options.get("sanitizeitems").values
.sort(function (a, b) String.localeCompare(a.name, b.name)),
function ({ name, description })
<><dt>{name}</dt><dd>{template.linkifyHelp(description, true)}</dd></>,
<>{"\n"}</>)
}</dl>
</overlay>;
});
},
events: function () {
events.listen(window, dactyl, "events", true);

View File

@@ -56,25 +56,7 @@
Items may be any of:
</p>
<dl>
<!-- TODO: autogenerate -->
<dt>all </dt> <dd>All items</dd>
<dt>cache </dt> <dd>Cache</dd>
<dt>commandline </dt> <dd>Command-line history</dd>
<dt>cookies </dt> <dd>Cookies</dd>
<dt>downloads </dt> <dd>Download history</dd>
<dt>formdata </dt> <dd>Saved form and search history</dd>
<dt>history </dt> <dd>Browsing history</dd>
<dt>host </dt> <dd>All data from the given host</dd>
<dt>marks </dt> <dd>Local and URL marks</dd>
<dt>messages </dt> <dd>Saved <ex>:messages</ex></dd>
<dt>offlineapps </dt> <dd>Offline website data</dd>
<dt>options </dt> <dd>Options containing hostname data</dd>
<dt>passwords </dt> <dd>Saved passwords</dd>
<dt>registers </dt> <dd>Register values</dd>
<dt>sessions </dt> <dd>Authenticated sessions</dd>
<dt>sitesettings</dt> <dd>Site preferences</dd>
</dl>
<dl tag="sanitize-items"/>
<p>
Items may be excluded by prefixing them with a <tt>!</tt>. The first