Skip to content

Commit

Permalink
Fix: --plugins option
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr committed Sep 22, 2020
1 parent 05d8a1b commit 2971c11
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ Done!
Restart Discord to see the results!
```

## Plugins
| Name | Group | Description | Maintainer |
| :-----------------: | :---: | :------------------------: | :--------: |
| enable_https | core | Disables CSP | GeopJr |
| enable_css | core | Enables css injection | GeopJr |
| unrestricted_resize | extra | Removes window size limits | GeopJr |

To enable groups of plugins use `$ crycord -g core,extra -c /path/to/css`

> Note: `core` is enabled by default so there's no need to include it.
## Benchmarks

Crycord:
Expand Down
4 changes: 2 additions & 2 deletions src/crycord.cr
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ module Crycord
should_revert = true
end
parser.on "-p", "--plugins", "Lists all available plugins" do
available_plugins = Crycord::PLUGINS.keys.map { |x| x = Crycord::PLUGINS[x].name + " | " + Crycord::PLUGINS[x].category + " | " + Crycord::PLUGINS[x].desc }.uniq
available_plugins = Crycord::PLUGINS.keys.reject! { |x| Crycord::PLUGINS[x].disabled }.map { |x| x = Crycord::PLUGINS[x].name + " | " + Crycord::PLUGINS[x].category + " | " + Crycord::PLUGINS[x].desc }.uniq
puts "Available plugins:"
puts "NAME | GROUP | DESCRIPTION"
puts available_plugins.reject! { |x| Crycord::PLUGINS[x].disabled }.join("\n")
puts available_plugins.join("\n")
puts "Note: Disabled plugins are omitted"
exit
end
Expand Down

0 comments on commit 2971c11

Please sign in to comment.