Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
这个 PR 为 example 目录下的示例文件补充了详细的中文注释,提升了用户脚本示例的可读性和易用性。
主要改进:
- 为多个 GM API 示例添加了结构化的中文注释文档
- 新增了两个示例文件:
require_css.js和crontab.js - 改进了代码格式,增强了示例代码的可维护性
Reviewed changes
Copilot reviewed 16 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| example/vscode.user.js | 添加末尾行号(格式化) |
| example/userconfig.js | 添加末尾行号(格式化) |
| example/require_local_file.js | 添加末尾行号(格式化) |
| example/require_css.js | 新增文件:演示 @require-css 功能的示例 |
| example/grant_none.js | 移除多余空行 |
| example/gm_xhr.js | 补充 GM_xmlhttpRequest 详细注释,优化代码格式 |
| example/gm_tab.js | 补充 GM_openInTab 注释,说明标签页控制功能 |
| example/gm_save_tab.js | 补充 GM_saveTab/getTab/getTabs 详细注释,说明标签页数据存储机制 |
| example/gm_log.js | 补充 GM_log 结构化日志注释,修正 @grant 格式 |
| example/gm_get_resource.js | 补充 GM_getResourceURL/Text 注释,优化描述 |
| example/gm_download.js | 补充 GM_download 注释,优化代码格式 |
| example/gm_cookie.js | 补充 GM_cookie 注释,修正 console.log 标签错误,优化代码格式 |
| example/gm_clipboard.js | 补充 GM_setClipboard 注释,修正 @grant 格式 |
| example/gm_async.js | 补充 GM.* Promise API 详细注释,调整 @resource 和 @grant 顺序 |
| example/gm_add_style.js | 补充 GM_addStyle 注释,说明 CSP 绕过能力 |
| example/gm_add_element.js | 补充 GM_addElement 注释,说明与 createElement 的区别 |
| example/early-start.js | 添加末尾行号(格式化) |
| example/crontab.js | 新增文件:演示定时脚本(crontab)功能的示例 |
| example/cloudcat.js | 移除多余空行 |
| example/cat_file_storage.js | 添加末尾分号(格式化) |
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.