- 263 名前:名無しさん@お腹いっぱい。 mailto:sage [2011/04/14(木) 12:23:28.95 ID: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 が実行されるタイミングの問題だと思うのですが、なにか良い解決方法はないでしょうか?
|

|