Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Firefox internal commands for some custom buttons

  • 5 trả lời
  • 1 gặp vấn đề này
  • 3 lượt xem
  • Trả lời mới nhất được viết bởi 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.

Được chỉnh sửa bởi genD5 vào

Tất cả các câu trả lời (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"

Được chỉnh sửa bởi genD5 vào

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 :)