Skip to content

feat: Disallow user selection on .highlight .gp#115

Merged
iBug merged 1 commit into
masterfrom
no-user-select-gp
May 18, 2026
Merged

feat: Disallow user selection on .highlight .gp#115
iBug merged 1 commit into
masterfrom
no-user-select-gp

Conversation

@taoky
Copy link
Copy Markdown
Member

@taoky taoky commented May 17, 2026

Make copying commands easier

@taoky taoky requested a review from iBug May 17, 2026 20:03
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying linux101-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: b9b2505
Status: ✅  Deploy successful!
Preview URL: https://ad15c696.linux101-docs.pages.dev
Branch Preview URL: https://no-user-select-gp.linux101-docs.pages.dev

View logs

@iBug
Copy link
Copy Markdown
Member

iBug commented May 18, 2026

解决了手动选中复制的部分,但是没解决点右上角复制按钮的部分,可以参考一下 uv 的实现:https://github.com/astral-sh/uv/blob/main/docs/js/extra.js

@taoky
Copy link
Copy Markdown
Member Author

taoky commented May 18, 2026

解决了手动选中复制的部分,但是没解决点右上角复制按钮的部分,可以参考一下 uv 的实现:https://github.com/astral-sh/uv/blob/main/docs/js/extra.js

复制按钮不变会不会更好?考虑到完整复制出来的内容是包含命令输出的

@iBug
Copy link
Copy Markdown
Member

iBug commented May 18, 2026

纯 CSS 修改是完全不改变复制按钮的行为的,也就是连 PS1 之类的也会复制出来,不只是命令输出

@iBug iBug merged commit 98854d5 into master May 18, 2026
3 checks passed
@iBug iBug deleted the no-user-select-gp branch May 18, 2026 10:00
github-actions Bot pushed a commit that referenced this pull request May 18, 2026
taoky: [98854d5] feat: Disallow user selection on .highlight .gp (#115)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants