为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Firefox internal commands for some custom buttons

  • 5 个回答
  • 1 人有此问题
  • 3 次查看
  • 最后回复者为 genD5

more options

Hi there! I have been looking for Firefox Browser internal commands list with commentaries describing what each of the commands is for. I want to add some custom toolbar buttons, so I need appropriate code for them. Particularly, I would like to learn the code (internal commands) for the following actions: 1. "Show All Download" in the Library / Ctrl+J Shortcut; 2. "Show All History" in the Library / Ctrl+Shift+H Shortcut.

I use this code for "Show All Bookmarks in the Library" custom toolbar button (Ctrl+Shift+B): gBrowser.selectedTab = gBrowser.addTab("chrome://browser/content/places/places.xul"

Unfortunately, you can't just replace "places.xul" with "downloads.xul" or "history.hul", while "browser/content/history/history-panel.xul" opens History Panel in the Side Bar and "browser/content/downloads/downloadPanel.xul" won't work at all.

Hi there! I have been looking for Firefox Browser internal commands list with commentaries describing what each of the commands is for. I want to add some custom toolbar buttons, so I need appropriate code for them. Particularly, I would like to learn the code (internal commands) for the following actions: 1. "Show All Download" in the Library / Ctrl+J Shortcut; 2. "Show All History" in the Library / Ctrl+Shift+H Shortcut. I use this code for "Show All Bookmarks in the Library" custom toolbar button (Ctrl+Shift+B): gBrowser.selectedTab = gBrowser.addTab("chrome://browser/content/places/places.xul" Unfortunately, you can't just replace "places.xul" with "downloads.xul" or "history.hul", while "browser/content/history/history-panel.xul" opens History Panel in the Side Bar and "browser/content/downloads/downloadPanel.xul" won't work at all.

由genD5于修改

所有回复 (5)

more options

Hello,

If I am understanding your question, are you both looking for a list of internal commands and a way to modify them?

For a list of keyboard shortcuts, please see: Keyboard shortcuts - Perform common Firefox tasks quickly

For an extension that allows you to modify your keyboard shortcuts: Customizable Shortcuts Add-on

more options

Hi, CoryMH. No, I am looking for the actual code which can be used for creating custom buttons as stated above. As the mater of fact, when you press a combination of buttons on the keyboard Firefox interprets it and executes a certain command associated with the keyboard shortcut. I need to figure out what exactly do I need to use in the "Code" section in the Button Creator which I use to create custom toolbar buttons. Something like JavaScript below: gBrowser.selectedTab = gBrowser.addTab("chrome://browser/content/places/places.xul"

由genD5于修改

more options

PlacesCommandHook.showPlacesOrganizer('History'); PlacesCommandHook.showPlacesOrganizer('Downloads');

more options
more options

A ton of thanks, cor-el! Just what I wanted! Is there a full list of all internal commands with kind of "annotations", I wonder? I'm adjusting the default design of Firefox to make it look and feel like Opera, so I might need as many custom buttons as possible. Done some research but wasn't lucky to discover the list so far :)