diff options
author | bptato <nincsnevem662@gmail.com> | 2024-06-29 00:22:00 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-06-29 00:26:56 +0200 |
commit | 8028c5a15a65dfdacb9ba8250c88e338546b49dc (patch) | |
tree | 968f3643852a6382f00dc0bd51ff0f659966f31b /src/config | |
parent | 8268ba2cf049be1865875e3e01305a500fa533e2 (diff) | |
download | chawan-8028c5a15a65dfdacb9ba8250c88e338546b49dc.tar.gz |
config: add various missing options
Mainly things you could already set with [[siteconf]] but not normally. Also, a `styling' option to disable author styles. Also, `images' is now documented as an "experimental" option, since it's halfway usable now.
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config/config.nim b/src/config/config.nim index 8783cb89..4e9d1517 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -59,6 +59,7 @@ type scripting*: Option[bool] document_charset*: seq[Charset] images*: Option[bool] + styling*: Option[bool] stylesheet*: Option[string] proxy*: Option[URL] default_headers*: TableRef[string, string] @@ -140,12 +141,20 @@ type ProtocolConfig* = ref object form_request*: FormRequestType + BufferSectionConfig* = object + styling* {.jsgetset.}: bool + scripting* {.jsgetset.}: bool + images* {.jsgetset.}: bool + cookie* {.jsgetset.}: bool + referer_from* {.jsgetset.}: bool + Config* = ref object jsctx: JSContext jsvfns*: seq[JSValueFunction] configdir {.jsget.}: string `include` {.jsget.}: seq[ChaPathResolved] start* {.jsget.}: StartConfig + buffer* {.jsget.}: BufferSectionConfig search* {.jsget.}: SearchConfig css* {.jsget.}: CSSConfig encoding* {.jsget.}: EncodingConfig @@ -169,6 +178,7 @@ jsDestructor(EncodingConfig) jsDestructor(ExternalConfig) jsDestructor(NetworkConfig) jsDestructor(DisplayConfig) +jsDestructor(BufferSectionConfig) jsDestructor(Config) converter toStr*(p: ChaPathResolved): string {.inline.} = @@ -833,4 +843,5 @@ proc addConfigModule*(ctx: JSContext) = ctx.registerType(ExternalConfig) ctx.registerType(NetworkConfig) ctx.registerType(DisplayConfig) + ctx.registerType(BufferSectionConfig, name = "BufferConfig") ctx.registerType(Config) |