1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-16 18:53:31 +01:00
Fixes #204 (statusbar should follow "site identification button" color
codes).
This commit is contained in:
Doug Kearns
2009-03-27 13:31:31 +11:00
parent 199c7a237d
commit 26fec12cad
4 changed files with 15 additions and 8 deletions

View File

@@ -1684,13 +1684,16 @@ function Events() //{{{
} }
}, },
// for notifying the user about secure web pages // for notifying the user about secure web pages
onSecurityChange: function (webProgress, aRequest, aState) onSecurityChange: function (webProgress, request, state)
{ {
if (aState & Ci.nsIWebProgressListener.STATE_IS_INSECURE) // TODO: do something useful with STATE_SECURE_MED and STATE_SECURE_LOW
if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
statusline.setClass("insecure"); statusline.setClass("insecure");
else if (aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) else if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
statusline.setClass("broken"); statusline.setClass("broken");
else if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
statusline.setClass("extended");
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
statusline.setClass("secure"); statusline.setClass("secure");
}, },
onStatusChange: function (webProgress, request, status, message) onStatusChange: function (webProgress, request, status, message)

View File

@@ -71,9 +71,10 @@ Highlights.prototype.CSS = <![CDATA[
LineNr color: orange; background: white; LineNr color: orange; background: white;
Question color: green; background: white; font-weight: bold; Question color: green; background: white; font-weight: bold;
StatusLine color: white; background: black; StatusLine color: white; background: black;
StatusLineBroken color: black; background: #FF6060 /* light-red */ StatusLineBroken color: black; background: #FFa0a0 /* light-red */
StatusLineSecure color: black; background: #B0FF00 /* light-green */ StatusLineSecure color: black; background: #a0a0FF /* light-blue */
StatusLineExtended color: black; background: #a0FFa0 /* light-green */
TabClose TabClose
TabIcon TabIcon

View File

@@ -2018,16 +2018,18 @@ function StatusLine() //{{{
/** /**
* Update the status bar to indicate how secure the website is: * Update the status bar to indicate how secure the website is:
* extended - Secure connection with Extended Validation(EV) certificate.
* secure - Secure connection with valid certificate. * secure - Secure connection with valid certificate.
* broken - Secure connection with invalid certificate, or * broken - Secure connection with invalid certificate, or
* mixed content. * mixed content.
* insecure - Insecure connection. * insecure - Insecure connection.
* *
* @param {'secure'|'broken'|'insecure'} type * @param {'extended'|'secure'|'broken'|'insecure'} type
*/ */
setClass: function setClass(type) setClass: function setClass(type)
{ {
const highlightGroup = { const highlightGroup = {
extended: "StatusLineExtended",
secure: "StatusLineSecure", secure: "StatusLineSecure",
broken: "StatusLineBroken", broken: "StatusLineBroken",
insecure: "StatusLine" insecure: "StatusLine"

View File

@@ -73,6 +73,7 @@ Valid groups are:
*StatusLine* The status bar *StatusLine* The status bar
*StatusLineBroken* The status bar for a broken web page *StatusLineBroken* The status bar for a broken web page
*StatusLineSecure* The status bar for a secure web page *StatusLineSecure* The status bar for a secure web page
*StatusLineExtended* The status bar for a secure web page with an Extended Validation(EV) certificate
*String* A JavaScript String object *String* A JavaScript String object
*TabClose* The close button of a browser tab *TabClose* The close button of a browser tab
*TabIcon* The icon of a browser tab *TabIcon* The icon of a browser tab