mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-17 19:53:31 +02:00
Add Security info to :pageinfo.
This commit is contained in:
@@ -141,6 +141,41 @@ var Buffer = Module("buffer", {
|
|||||||
.sort(function (a, b) util.compareIgnoreCase(a[0], b[0]));
|
.sort(function (a, b) util.compareIgnoreCase(a[0], b[0]));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let identity = window.gIdentityHandler;
|
||||||
|
this.addPageInfoSection("s", "Security", function (verbose) {
|
||||||
|
if (!verbose || !identity)
|
||||||
|
return; // For now
|
||||||
|
|
||||||
|
// Modified from Firefox
|
||||||
|
function location(data) array.compact([
|
||||||
|
data.city, data.state, data.country
|
||||||
|
]).join(", ");
|
||||||
|
|
||||||
|
switch (statusline.security) {
|
||||||
|
case "secure":
|
||||||
|
case "extended":
|
||||||
|
var data = identity.getIdentityData();
|
||||||
|
|
||||||
|
yield ["Host", identity.getEffectiveHost()];
|
||||||
|
|
||||||
|
if (statusline.security === "extended")
|
||||||
|
yield ["Owner", data.subjectOrg]
|
||||||
|
else
|
||||||
|
yield ["Owner", _("pageinfo.s.ownerUnverified", data.subjectOrg)]
|
||||||
|
|
||||||
|
if (location(data).length)
|
||||||
|
yield ["Location", location(data)];
|
||||||
|
|
||||||
|
yield ["Verified by", data.caOrg];
|
||||||
|
|
||||||
|
if (identity._overrideService.hasMatchingOverride(identity._lastLocation.hostname,
|
||||||
|
(identity._lastLocation.port || 443),
|
||||||
|
data.cert, {}, {}))
|
||||||
|
yield ["User exception", "true"]
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
dactyl.commands["buffer.viewSource"] = function (event) {
|
dactyl.commands["buffer.viewSource"] = function (event) {
|
||||||
let elem = event.originalTarget;
|
let elem = event.originalTarget;
|
||||||
buffer.viewSource([elem.getAttribute("href"), Number(elem.getAttribute("line"))]);
|
buffer.viewSource([elem.getAttribute("href"), Number(elem.getAttribute("line"))]);
|
||||||
@@ -1850,7 +1885,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", "gfm",
|
"charlist", "gsfm",
|
||||||
{ get values() values(buffer.pageInfo).toObject() });
|
{ get values() values(buffer.pageInfo).toObject() });
|
||||||
|
|
||||||
options.add(["scroll", "scr"],
|
options.add(["scroll", "scr"],
|
||||||
|
|||||||
@@ -226,6 +226,8 @@ option.popups.safeSet = See the 'activate' option.
|
|||||||
option.guioptions.safeSet = See 'guioptions' scrollbar flags.
|
option.guioptions.safeSet = See 'guioptions' scrollbar flags.
|
||||||
option.visualbell.safeSet = See 'visualbell' option.
|
option.visualbell.safeSet = See 'visualbell' option.
|
||||||
|
|
||||||
|
pageinfo.s.ownerUnverified = %S (unverified)
|
||||||
|
|
||||||
plugin.searchingFor-1 = Searching for %S
|
plugin.searchingFor-1 = Searching for %S
|
||||||
plugin.searchingForIn-2 = Searching for %S in %S
|
plugin.searchingForIn-2 = Searching for %S in %S
|
||||||
plugin.notReplacingContext-1 = Not replacing plugin context for %S
|
plugin.notReplacingContext-1 = Not replacing plugin context for %S
|
||||||
|
|||||||
@@ -1103,6 +1103,7 @@
|
|||||||
<dt>g</dt> <dd>General info</dd>
|
<dt>g</dt> <dd>General info</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>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1246,7 +1246,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
|
|
||||||
let sentinel = "(function DactylOverlay() {}())"
|
let sentinel = "(function DactylOverlay() {}())"
|
||||||
value.toString = function toString() toString.toString.call(this).replace(/\}?$/, sentinel + "; $&");
|
value.toString = function toString() toString.toString.call(this).replace(/\}?$/, sentinel + "; $&");
|
||||||
value.toSource = function toSource() toString.toSource.call(this).replace(/\}?$/, sentinel + "; $&");
|
value.toSource = function toSource() toSource.toSource.call(this).replace(/\}?$/, sentinel + "; $&");
|
||||||
|
|
||||||
delete desc.value;
|
delete desc.value;
|
||||||
delete desc.writable;
|
delete desc.writable;
|
||||||
|
|||||||
@@ -108,6 +108,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 :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
|
||||||
@@ -178,6 +179,7 @@
|
|||||||
- Replaced 'focuscontent' with 'strictfocus'. [b1]
|
- Replaced 'focuscontent' with 'strictfocus'. [b1]
|
||||||
- 'complete' now defaults to "slf" but file completion only
|
- 'complete' now defaults to "slf" but file completion only
|
||||||
triggers when the URL begins as above. [b1]
|
triggers when the URL begins as above. [b1]
|
||||||
|
- Added 's' flag to 'pageinfo' and changed default value. [b7]
|
||||||
- Added 'passkeys' option. [b3]
|
- Added 'passkeys' option. [b3]
|
||||||
- Changed 'urlseparator' default value to "|". [b3]
|
- Changed 'urlseparator' default value to "|". [b3]
|
||||||
- Added "passwords" and "venkman" dialogs to :dialog. [b2]
|
- Added "passwords" and "venkman" dialogs to :dialog. [b2]
|
||||||
|
|||||||
Reference in New Issue
Block a user