-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zh-CN: create sidebarAction.setTitle()
#24903
Conversation
Preview URLs Flaws (13)URL:
External URLs (1)URL:
(comment last updated: 2024-12-13 14:41:59) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下次遇到这类问题可以联系我们,有些做法我们并不推荐。但如果只看预览网页的话又会发现不了,容易把我们不希望看到的表示方法引入到中文文档中。
files/zh-cn/mozilla/add-ons/webextensions/api/sidebaraction/settitle/index.md
Outdated
Show resolved
Hide resolved
files/zh-cn/mozilla/add-ons/webextensions/api/sidebaraction/settitle/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还有一个上游的拼写错误:mdn/content#37095
files/zh-cn/mozilla/add-ons/webextensions/api/sidebaraction/settitle/index.md
Outdated
Show resolved
Hide resolved
files/zh-cn/mozilla/add-ons/webextensions/api/sidebaraction/settitle/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: A1lo <[email protected]>
打错了,翻译成“清单” :/ |
ohno其他地方全改成“manifest”了 |
files/zh-cn/mozilla/add-ons/webextensions/api/sidebaraction/settitle/index.md
Outdated
Show resolved
Hide resolved
|
||
## 标题类型 | ||
|
||
你的附加组件应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将使用默认值即附加组件名。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你的附加组件应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将使用默认值即附加组件名。 | |
你的扩展应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将默认使用扩展名。 |
|
||
你的附加组件应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将使用默认值即附加组件名。 | ||
|
||
如果你使用 `setTitle()` 设置新标题,并包含 `tabId` 选项,那么标题仅为给定的标签设置。这个标题称为“_标签特定标题_”。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果你使用 `setTitle()` 设置新标题,并包含 `tabId` 选项,那么标题仅为给定的标签设置。这个标题称为“_标签特定标题_”。 | |
如果你使用 `setTitle()` 设置新标题,并包含 `tabId` 选项,那么标题仅为给定的标签页设置。这个标题称为“_标签页特定标题_”。 |
|
||
如果你使用 `setTitle()` 设置新标题,并包含 `windowId` 选项,那么标题仅为给定的窗口设置。这个标题称为“_窗口特定标题_”,并将出现在该窗口的所有标签中,这些标签没有设置标签特定标题。 | ||
|
||
如果你使用 `setTitle()` 设置新标题,并省略 `tabId` 和 `windowId` 选项,那么这将设置“_全局标题_”。全局标题将出现在所有没有设置标签特定标题的标签中,且其窗口没有设置窗口特定标题的标签中。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果你使用 `setTitle()` 设置新标题,并省略 `tabId` 和 `windowId` 选项,那么这将设置“_全局标题_”。全局标题将出现在所有没有设置标签特定标题的标签中,且其窗口没有设置窗口特定标题的标签中。 | |
如果你使用 `setTitle()` 设置新标题,并省略 `tabId` 和 `windowId` 选项,那么这将设置“_全局标题_”。全局标题将出现在所有没有设置标签页特定标题的标签中,且其窗口没有设置窗口特定标题的标签页中。 |
|
||
- `details` | ||
|
||
- : `object`。新标题和可选的目标标签页或窗口 ID。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- : `object`。新标题和可选的目标标签页或窗口 ID。 | |
- : `object`。具有以下属性的对象: |
|
||
- `title` | ||
|
||
- : `string` 或 `null`。鼠标悬停时浏览器操作应显示的字符串。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
串台了?上面和这边都错了
|
||
- : `string` 或 `null`。鼠标悬停时浏览器操作应显示的字符串。 | ||
|
||
如果 `title` 是空字符串,则使用附加组件名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果 `title` 是空字符串,则使用附加组件名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。 | |
如果 `title` 是空字符串,则使用扩展名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。 |
|
||
如果 `title` 是空字符串,则使用附加组件名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。 | ||
|
||
如果 `title` 为 `null`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
又翻译成“拓展”了
No description provided.