custom CSS code for DiscordApp

2019-09-17 20:43发布

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 DiscordApp

Link to Example CSS sheet for a random Theme

1条回答
混吃等死
2楼-- · 2019-09-17 21:39

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

If you want to quickly try out themes or Javascript, hit the Ctrl + Shift + I keycodes. It'll open the developer tools of Discord


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

Note: installing unofficial third party tools or software might leave you prone to hacks, leaks and other security issues.

查看更多
登录 后发表回答