Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Ren <[email protected]>
  • Loading branch information
yin1999 and jasonren0403 authored Aug 27, 2024
1 parent aaa0bdd commit 95a53ad
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ _以下截图显示了 macOS 上的 Firefox 71 和 Safair 13 以及 Windows 10

例如,当你点击这个小部件图像坐标为 (123,456) 的位置时,它将会通过 `get` 方法提交。你可以看到类似的 URL:

```plain
```url
http://foo.com?pos.x=123&pos.y=456
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ source ~/.bashrc

此时,你应该能看到一些脚本正在运行,如下所示:

```plain
```bash
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/premkproject
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/postmkproject
...
#
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/preactivate
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/postactivate
virtualenvwrapper.user_scripts creating /home/ubuntu/.virtualenvs/get_env_details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ browser.alarms.onAlarm.addListener(copy);

这种触发不一定成功,它取决于浏览器是否支持。Firefox 浏览器就不支持该功能,你会在浏览器控制台中看到以下信息:

```plain
"document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler."
```
`document.execCommand('cut'/'copy') was denied because it was not called from inside a short running user-generated event handler.`

为了能够在这种情形下使用,你需要拥有"clipboardWrite"的权限( [permission](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions))。因此,"clipboardWrite"权限能使你不通过临时事件处理程序就可以写入系统粘贴板中。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ slug: Mozilla/Add-ons/WebExtensions/manifest.json/permissions

Firefox 浏览器,自 56 以后的版本,扩展都会自动获取其源的主机权限,如以下形式:

```plain
```url
moz-extension://60a20a9b-1ad4-af49-9b6c-c64c98c37920/
```

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/http/status/502/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ slug: Web/HTTP/Status/502
## 状态

```plain
```http
502 Bad Gateway
```

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/text_fragments/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ slug: Web/Text_fragments

与文档片段行为类似,文本片段被附加到 URL 的哈希符号(`#`)后。但语法有轻微不同:

```plain
```url
https://example.com#:~:text=[prefix-,]textStart[,textEnd][,-suffix]
```

Expand Down

0 comments on commit 95a53ad

Please sign in to comment.