FFの拡張機能を開発中です。私がやろうとしているのは、新しいブックマークが作成されたときにイベントをキャッチし、ブックマーク ポップアップに追加のコントロールを追加することです。私は長い間、これを行う正しい方法を探してきましたが、成功しませんでした。どんな助けも高く評価されます。
2 に答える
0
editBookmarkPanelのpopupshown
イベントをリッスンする
于 2013-02-07T11:39:49.660 に答える
0
わかりましたので、解決策を見つけました:
/* Override the original browser Click event on the star button */
PlacesStarButton.onClick = function PSB_onClick(aEvent){
// Ignore clicks on the star while we update its state.
if (aEvent.button == 0 && !this._pendingStmt) {
PlacesCommandHook.bookmarkCurrentPage(true);
}
// Don't bubble to the textbox, to avoid unwanted selection of the address.
aEvent.stopPropagation();
}
于 2013-02-11T09:40:27.870 に答える