【Firefoxアドオン】Vimperator【Vim】at SOFTWARE
【Firefoxアドオン】Vimperator【Vim】 - 暇つぶし2ch263:名無しさん@お腹いっぱい。
11/04/14 12:23:28.95 yDrSbpW20
質問です。
ステータスラインにSSL認証の情報を表示しようと思い以下のコマンドを書いてみたのですが、うまくゆきません。

autocommands.add( 'LocationChange', '.*',
function () {
let scheme = util.newURI(buffer.URL).scheme;
let sslmode = window.gIdentityHandler._mode;
let statusline = document.getElementById("liberator-bottombar");
if (scheme == "https") {
if (sslmode == "verifiedIdentity")
statusline.setAttribute("class", "extended");
else if (sslmode == "verifiedDomain")
statusline.setAttribute("class", "secure");
else if (sslmode == "mixedContent")
statusline.setAttribute("class", "mixed");
else if (sslmode == "unknownIdentity")
statusline.setAttribute("class", "danger");
}
else
statusline.setAttribute("class", "normal");
});

これだとページ移動の際、scheme は移動後のページから取得できるのですが、
sslmode は移動前のページから取得してしまいます。
autocmd が実行されるタイミングの問題だと思うのですが、なにか良い解決方法はないでしょうか?


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch