custom CSS code for DiscordApp

本小妞迷上赌 提交于 2019-12-12 05:57:54

问题


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:


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.



来源:https://stackoverflow.com/questions/43024071/custom-css-code-for-discordapp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!