Rename Tab Title 的评价
Rename Tab Title 作者: Anush Veeranala
Firefox 用户 13832595 的评价
评分 1 / 5
来自 Firefox 用户 13832595,6 年前It appears to work, but it has five problems which are pretty major, given what a large portion of the addon they are.
1. The Ctrl+Shift+E shortcut already HAS a use. It opens up the network panel in the developer tools... and, here on Linux, Firefox doesn't allow extensions to override built-in hotkeys. (See Bugzilla bug # 1325692. I actually wrote a utility which intercepts Ctrl+Q when Firefox is the active window to work around this shortcoming.)
2. Cluttering up either my toolbar or my overflow menu using a browser action is awkward and bad UI design. The proper way to implement a function like this is to add it to the tab context menu using browser.menus.create and the "tab" context type. (Because of a limitation in the WebExtensions API, Tree Style Tab can't query custom tab context menu entries, so you'll also want to use the code snippet from the "API for other addons" page in the Tree Style Tab wiki to register yourself with Tree Style Tab's context menu.)
3. The popup looks terrible. If you're going to use a browser-provided popup panel, please set browser_style to true when declaring it, so Firefox will inject the same CSS rules used for things like the bookmark star. The "Browser styles" page in the MDN WebExtensions documentation has more information.
4. I use a tab suspender addon to keep memory consumption down and using a browser action means that I have to load a tab back into memory in order to edit its title. (Which means I have to wait for the tab to reload because, while the current tab is in the process of loading or reloading, Rename Tab Title will just see "undefined" as the current title.) Using a context menu entry would allow me to rename unloaded tabs without reloading them first.
5. Drag-and-drop reordering tabs using Tree Style Tab's sidebar sometimes unsets the customized tab title. (eg. I experienced it on a tab containing my GOG.com friends list, which only has "GOG.com" as its title.)
What I'd do is:
a. Register a context menu entry for tabs with both Firefox and Tree Style Tab (be sure to use the example code, so it silences any "Could not send a message to Tree Style Tab because it's not installed" errors.) and have it display an ordinary window.prompt popup. (The alternative is to inject content into the site, which is fragile and takes a lot of work to make it consistently look nice.)
b. Have the browser action take users directly to the Edit All option. (Browser actions are supposed to be for things which are not specific to the current tab's contents, like NoScript or uMatrix policies which apply to entire domains, or in-progress downloads which have lifetimes independent of specific tabs.)
c. Identify why the drag-and-drop reordering breaks things and fix it. (Worst case scenario, maybe there's a Tree Style Tabs event you can attach to.)
EDIT: I dropped the rating down to one star because it seems to consistently forget the customization when the page gets reloaded after the tab's been suspended. That makes it effectively useless to me.
1. The Ctrl+Shift+E shortcut already HAS a use. It opens up the network panel in the developer tools... and, here on Linux, Firefox doesn't allow extensions to override built-in hotkeys. (See Bugzilla bug # 1325692. I actually wrote a utility which intercepts Ctrl+Q when Firefox is the active window to work around this shortcoming.)
2. Cluttering up either my toolbar or my overflow menu using a browser action is awkward and bad UI design. The proper way to implement a function like this is to add it to the tab context menu using browser.menus.create and the "tab" context type. (Because of a limitation in the WebExtensions API, Tree Style Tab can't query custom tab context menu entries, so you'll also want to use the code snippet from the "API for other addons" page in the Tree Style Tab wiki to register yourself with Tree Style Tab's context menu.)
3. The popup looks terrible. If you're going to use a browser-provided popup panel, please set browser_style to true when declaring it, so Firefox will inject the same CSS rules used for things like the bookmark star. The "Browser styles" page in the MDN WebExtensions documentation has more information.
4. I use a tab suspender addon to keep memory consumption down and using a browser action means that I have to load a tab back into memory in order to edit its title. (Which means I have to wait for the tab to reload because, while the current tab is in the process of loading or reloading, Rename Tab Title will just see "undefined" as the current title.) Using a context menu entry would allow me to rename unloaded tabs without reloading them first.
5. Drag-and-drop reordering tabs using Tree Style Tab's sidebar sometimes unsets the customized tab title. (eg. I experienced it on a tab containing my GOG.com friends list, which only has "GOG.com" as its title.)
What I'd do is:
a. Register a context menu entry for tabs with both Firefox and Tree Style Tab (be sure to use the example code, so it silences any "Could not send a message to Tree Style Tab because it's not installed" errors.) and have it display an ordinary window.prompt popup. (The alternative is to inject content into the site, which is fragile and takes a lot of work to make it consistently look nice.)
b. Have the browser action take users directly to the Edit All option. (Browser actions are supposed to be for things which are not specific to the current tab's contents, like NoScript or uMatrix policies which apply to entire domains, or in-progress downloads which have lifetimes independent of specific tabs.)
c. Identify why the drag-and-drop reordering breaks things and fix it. (Worst case scenario, maybe there's a Tree Style Tabs event you can attach to.)
EDIT: I dropped the rating down to one star because it seems to consistently forget the customization when the page gets reloaded after the tab's been suspended. That makes it effectively useless to me.