跳到正文

科技·工程

Luogu Chat Better!

Forever_Rain约 4 分钟
原文

这是 2026年8月30日 存档的第 9 版,不是当前版本。查看当前版本

文章信息与版本

前言

在洛谷私信发一大段消息的时候,由于无法自动聚焦输入框,经常要点击,极大地影响了我们水谷的速度,所以做了这个插件(

本插件简称 lgcb,来源于名称缩写。

效果图

使用

左键点击消息会弹出菜单,有复制和回复消息功能。

给出正确的图片 Markdown 可以在私信中显示图片。

其他大部分为样式优化。

设置

整个脚本最前端,有一块代码(已经标识出)。

你可以修改参数的值来实现不同的效果。

配置项类型默认值作用
enableOwnColorbooltrue是否启用自己消息的颜色修改
ownBgColorstring"#d9f0ff"自己消息气泡的背景色
ownTextColorstring"#000000"自己消息的文字颜色
enableOwnRadiusbooltrue是否为自己消息应用圆角化
enableOtherColorboolfalse是否启用对方消息的颜色修改
otherBgColorstring""(洛谷默认)对方消息气泡的背景色
otherTextColorstring""(洛谷默认)对方消息的文字颜色
enableOtherRadiusbooltrue是否为对方消息应用圆角
enableQuoteReplybooltrue是否启用消息点击弹出菜单功能
quoteSeparatorstring" ||"引用时插入到输入框前的分隔符

安装

你可以通过下面的方法安装:

  1. https://mine.xo.je/Forever_Rain/lgcb.user.js

  2. https://www.luogu.com.cn/paste/nm978jz9 (备用)

MIT License

Luogu Chat Better

Copyright 2026 Forever_Rain

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.