The recent incident made me to rethink if I should continue ignoring the missing encryption state in Vimperators statusline. When I first noticed its gone, I believe that might be my fault, probably something style broke it. But its 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 dont 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, thats all you need to conclude them. Really I dont mind, but you remove to please those users, thats 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