问题描述
我只需要一些自定义CSS代码即可在名为DiscordApp的应用程序上稍微更改我的聊天文本,
- 自动滚动到底部页面
- 自定义文本大小
- 自定义头像文本通道大小
要将自定义CSS和JS注入Discord,您需要第三方插件,例如
对于BetterDiscord,您必须遵循其,以了解CSS更改。您还可以深入设置并将其直接添加到自定义CSS中。
TLDR
创建带有META标签和CSS的MyCSS.theme.css文件
// META { name:我的自定义CSSScript, description:矿井, author: Me, version: 1.0} * // {}
.my-css-class {
/ *示例... * /
}
将此文件保存到%AppData%\BetterDiscord\themes
使用Ctrl + R重新加载Discord并激活您的主题(如果还没有的话)
Auto滚动到页面底部
听起来更像是JS函数,您可以通过创建一个至少包含至少
// META { name: ScrollDown} * //
window.scrollTo(0,document.body.scrollHeight);
该功能位于您在屏幕上放置的按钮内。 Discord支持jQuery,因此甚至不需要纯JavaScript。
添加javascript插件的步骤大致相同,但在plugins文件夹中,它们的名称为MyPlugin.plugin.js
I Just need some Custom CSS code to change my Chat text a bit on an app called DiscordApp,
- Auto Scroll To bottom of Page
- Custom Text Size
- Custom Avatar Text Channel Size
Link to Example CSS sheet for a random Theme
To inject custom CSS and JS into Discord, you'll need a third party plugin such as BetterDiscord
For the case of BetterDiscord, you have to follow their tutorial for the CSS changes. You can also dive into the settings and add it straight into custom CSS.
TLDR
Create a MyCSS.theme.css file with a META-tag and CSS
//META{"name":"My custom CSSScript","description":"Mine.","author":"Me","version":"1.0"}*//{}
.my-css-class{
/*Example...*/
}
Save this file to %AppData%\BetterDiscord\themes
Reload Discord with Ctrl+R and activate your theme, if you hadn't already
Auto Scroll To bottom of Page
sounds more of a JS function though, you can easily achieve it by creating a scrollToBottom.plugin.js file containing at least
//META{"name":"ScrollDown"}*//
window.scrollTo(0,document.body.scrollHeight);
the function being inside of a button you place on screen. Discord supports jQuery, so pure javascript isn't even necessary.
The steps for adding javascript plugins is about the same, but inside of the plugins folder instead, and they're called MyPlugin.plugin.js
这篇关于DiscordApp的自定义CSS代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!