mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 06:07:59 +01:00
Make last commit less sucky.
This commit is contained in:
@@ -265,9 +265,16 @@ var Buffer = Module("buffer", {
|
|||||||
// for notifying the user about secure web pages
|
// for notifying the user about secure web pages
|
||||||
onSecurityChange: function onSecurityChange(webProgress, request, state) {
|
onSecurityChange: function onSecurityChange(webProgress, request, state) {
|
||||||
onSecurityChange.superapply(this, arguments);
|
onSecurityChange.superapply(this, arguments);
|
||||||
|
if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
|
||||||
|
statusline.security = "broken";
|
||||||
|
else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
|
||||||
|
statusline.security = "extended";
|
||||||
|
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
|
||||||
|
statusline.security = "secure";
|
||||||
|
else // if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
||||||
|
statusline.security = "insecure";
|
||||||
if (webProgress && webProgress.DOMWindow)
|
if (webProgress && webProgress.DOMWindow)
|
||||||
webProgress.DOMWindow.document.dactylSecurity = state;
|
webProgress.DOMWindow.document.dactylSecurity = statusline.security;
|
||||||
statusline.security = state;
|
|
||||||
},
|
},
|
||||||
onStatusChange: function onStatusChange(webProgress, request, status, message) {
|
onStatusChange: function onStatusChange(webProgress, request, status, message) {
|
||||||
onStatusChange.superapply(this, arguments);
|
onStatusChange.superapply(this, arguments);
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ var StatusLine = Module("statusline", {
|
|||||||
*
|
*
|
||||||
* @param {'extended'|'secure'|'broken'|'insecure'} type
|
* @param {'extended'|'secure'|'broken'|'insecure'} type
|
||||||
*/
|
*/
|
||||||
set class(type) {
|
set security(type) {
|
||||||
this._class = type;
|
this._security = type;
|
||||||
const highlightGroup = {
|
const highlightGroup = {
|
||||||
extended: "StatusLineExtended",
|
extended: "StatusLineExtended",
|
||||||
secure: "StatusLineSecure",
|
secure: "StatusLineSecure",
|
||||||
@@ -93,17 +93,7 @@ var StatusLine = Module("statusline", {
|
|||||||
|
|
||||||
highlight.highlightNode(this.statusBar, this.baseGroup + highlightGroup[type]);
|
highlight.highlightNode(this.statusBar, this.baseGroup + highlightGroup[type]);
|
||||||
},
|
},
|
||||||
get class() this._class,
|
get security() this._security,
|
||||||
set security(state) {
|
|
||||||
if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
|
|
||||||
this.class = "broken";
|
|
||||||
else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
|
|
||||||
this.class = "extended";
|
|
||||||
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
|
|
||||||
this.class = "secure";
|
|
||||||
else // if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
|
|
||||||
this.class = "insecure";
|
|
||||||
},
|
|
||||||
|
|
||||||
// update all fields of the statusline
|
// update all fields of the statusline
|
||||||
update: function update() {
|
update: function update() {
|
||||||
|
|||||||
Reference in New Issue
Block a user