|
|
@@ -9,35 +9,44 @@ import (
|
|
|
"github.com/BurntSushi/toml"
|
|
|
)
|
|
|
|
|
|
-const Name = "discordo"
|
|
|
+const (
|
|
|
+ Name = "discordo"
|
|
|
+
|
|
|
+ Browser = "Chrome"
|
|
|
+ BrowserVersion = "132.0.0.0"
|
|
|
+ UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) " + Browser + "/" + BrowserVersion + " Safari/537.36"
|
|
|
+)
|
|
|
|
|
|
type Config struct {
|
|
|
- Mouse bool `toml:"mouse"`
|
|
|
- HideBlockedUsers bool `toml:"hide_blocked_users"`
|
|
|
+ Mouse bool `toml:"mouse"`
|
|
|
+ HideBlockedUsers bool `toml:"hide_blocked_users"`
|
|
|
+ Timestamps bool `toml:"timestamps"`
|
|
|
+ ShowAttachmentLinks bool `toml:"show_attachment_links"`
|
|
|
+ MessagesLimit uint8 `toml:"messages_limit"`
|
|
|
+ Editor string `toml:"editor"`
|
|
|
|
|
|
- MessagesLimit uint8 `toml:"messages_limit"`
|
|
|
- Editor string `toml:"editor"`
|
|
|
+ Browser string `toml:"browser"`
|
|
|
+ BrowserVersion string `toml:"browser_version"`
|
|
|
+ UserAgent string `toml:"user_agent"`
|
|
|
|
|
|
- Timestamps bool `toml:"timestamps"`
|
|
|
TimestampsFormat string `toml:"timestamps_format"`
|
|
|
-
|
|
|
- ShowAttachmentLinks bool `toml:"show_attachment_links"`
|
|
|
-
|
|
|
- Keys Keys `toml:"keys"`
|
|
|
- Theme Theme `toml:"theme"`
|
|
|
+ Keys Keys `toml:"keys"`
|
|
|
+ Theme Theme `toml:"theme"`
|
|
|
}
|
|
|
|
|
|
func defaultConfig() *Config {
|
|
|
return &Config{
|
|
|
- Mouse: true,
|
|
|
- HideBlockedUsers: true,
|
|
|
- MessagesLimit: 50,
|
|
|
- Editor: "default",
|
|
|
-
|
|
|
- Timestamps: false,
|
|
|
- TimestampsFormat: time.Kitchen,
|
|
|
-
|
|
|
+ Mouse: true,
|
|
|
+ HideBlockedUsers: true,
|
|
|
+ Timestamps: false,
|
|
|
ShowAttachmentLinks: true,
|
|
|
+ MessagesLimit: 50,
|
|
|
+ Editor: "default",
|
|
|
+ TimestampsFormat: time.Kitchen,
|
|
|
+
|
|
|
+ Browser: Browser,
|
|
|
+ BrowserVersion: BrowserVersion,
|
|
|
+ UserAgent: UserAgent,
|
|
|
|
|
|
Keys: defaultKeys(),
|
|
|
Theme: defaultTheme(),
|