mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-06 05:35:46 +01:00
Fix #204.
Fixes #204 (statusbar should follow "site identification button" color codes).
This commit is contained in:
@@ -1684,13 +1684,16 @@ function Events() //{{{
|
||||
}
|
||||
},
|
||||
// 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");
|
||||
else if (aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
|
||||
else if (state & Ci.nsIWebProgressListener.STATE_IS_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");
|
||||
},
|
||||
onStatusChange: function (webProgress, request, status, message)
|
||||
|
||||
@@ -71,9 +71,10 @@ Highlights.prototype.CSS = <![CDATA[
|
||||
LineNr color: orange; background: white;
|
||||
Question color: green; background: white; font-weight: bold;
|
||||
|
||||
StatusLine color: white; background: black;
|
||||
StatusLineBroken color: black; background: #FF6060 /* light-red */
|
||||
StatusLineSecure color: black; background: #B0FF00 /* light-green */
|
||||
StatusLine color: white; background: black;
|
||||
StatusLineBroken color: black; background: #FFa0a0 /* light-red */
|
||||
StatusLineSecure color: black; background: #a0a0FF /* light-blue */
|
||||
StatusLineExtended color: black; background: #a0FFa0 /* light-green */
|
||||
|
||||
TabClose
|
||||
TabIcon
|
||||
|
||||
@@ -2018,16 +2018,18 @@ function StatusLine() //{{{
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* broken - Secure connection with invalid certificate, or
|
||||
* mixed content.
|
||||
* insecure - Insecure connection.
|
||||
*
|
||||
* @param {'secure'|'broken'|'insecure'} type
|
||||
* @param {'extended'|'secure'|'broken'|'insecure'} type
|
||||
*/
|
||||
setClass: function setClass(type)
|
||||
{
|
||||
const highlightGroup = {
|
||||
extended: "StatusLineExtended",
|
||||
secure: "StatusLineSecure",
|
||||
broken: "StatusLineBroken",
|
||||
insecure: "StatusLine"
|
||||
|
||||
@@ -73,6 +73,7 @@ Valid groups are:
|
||||
*StatusLine* The status bar
|
||||
*StatusLineBroken* The status bar for a broken 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
|
||||
*TabClose* The close button of a browser tab
|
||||
*TabIcon* The icon of a browser tab
|
||||
|
||||
Reference in New Issue
Block a user