I'm currently developing an addon for firefox that posts data periodically to a server; but I would like to be able to stop posting when needed. Since you can not call functions within an addon from Firebug/Web Console, the next best alternative is to have an entry 'Stop Posting' in the context menu of the docu开发者_StackOverflow中文版ment. Do you know how to add this entry to the list and fire a function when clicked on?
See https://developer.mozilla.org/En/XUL/PopupGuide/Extensions#Modifying_the_context_menu
精彩评论