Repository navigation
fixed github-raw-file-plus copy feature - #359
Merged
Merged
Conversation
Collaborator
|
@paponius 你好,人民的勤务员将尽快审查合并此次请求!🚀 [自动回复,请勿跟帖] |
Owner
|
thanks |
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.
变更内容
请简要描述本次提交的变更内容(修复了什么问题、增加了什么功能等)。
fixed github-raw-file-plus copy feature
相关问题
请列出本次 PR 相关的 issue 编号(例如:#123)。
I did not see an Issue filed on GitHub, though there is one on
https://greasyfork.org/en/scripts/505501-github-copy-raw-file-url-and-download-file/discussions/325923
变更类型
测试情况
请描述本次提交的变更是否经过测试,以及测试的方式和结果。
tested lightly. Firefox.
注意事项
是否有需要注意的内容或潜在问题(例如,兼容性、依赖项等)?
The cause of the issue:
The clipboard-copy custom element provided natively by GitHub requires a valid for attribute pointing to a target element containing the text, or proper internal value bindings that GitHub's web components library listens to. Since the script injects these elements outside of GitHub's native registration flow, the click handler on the copy button fails.
Also added a feedback, a text showing after the button is clicked.
Recommendations:
The name and description of the script:
// @name:en GitHub Raw File URL Copy & Download
// @description:en Adds buttons to copy raw file URLs and download files directly on GitHub.
While the current EN is somewhat understandable, it leads to further weirdness when translated to other languages.
I do understand few of those used in meta of the script and I can see the translations do not make sense at all.
I checked translate.google.com using the EN I proposed above and it translates to a reasonable degree to other languages.