The recent incident made me to rethink if I should continue ignoring the missing encryption state in Vimperator’s statusline. When I first noticed it’s gone, I believe that might be my fault, probably something style broke it. But it’s not1, I broke nothing.
Long story short, Vimperator removed such feature in favor of the Firefox location bar.
(Detour to rant: Vimperator is vimperator, I don’t mind you add features for those who can get a hold of the essential spirit of Vim, and love showing off how so-call geek or techy they are. They are just a user who read or try a little more, and tweet how awesome it is, that’s all you need to conclude them. Really I don’t mind, but you remove to please those users, that’s completely wrong unless you rename the project name to Notepator. Location bar, ha? What the frak is that? I even hide tab bar and statusline sometimes)
Comment #31 provides a solution, download it and put it under ~/.vimperator/plugin, then restart Firefox and you are good to go.
I changed the style to match my theme:
"use strict";
Cu.import("resource://gre/modules/XPCOMUtils.jsm", modules);
const progressListener = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIWebProgressListener]),
onSecurityChange: function onSecurityChange(webProgress, request, state) {
var sl_css = 'background: #333; font-family: Inconsolata; font-size: 14px; margin-top: 1px; ';
if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
sl_css += "color: #ddc;";
else if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
sl_css += "color: red; font-weight: bold;";
else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
sl_css += "color: #87A96B;";
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
sl_css += "color: #89CFF0;";
highlight.set("StatusLine", sl_css);
}
};
config.browser.addProgressListener(progressListener, Ci.nsIWebProgress.NOTIFY_SECURITY);
Do whatever you want with it as the original states.
[1] | (1, 2) http://code.google.com/p/vimperator-labs/issues/detail?id=542 and http://code.google.com/p/vimperator-labs/issues/detail?id=542#c3 are gone. |
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.