about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-06-29 00:22:00 +0200
committerbptato <nincsnevem662@gmail.com>2024-06-29 00:26:56 +0200
commit8028c5a15a65dfdacb9ba8250c88e338546b49dc (patch)
tree968f3643852a6382f00dc0bd51ff0f659966f31b /src/config
parent8268ba2cf049be1865875e3e01305a500fa533e2 (diff)
downloadchawan-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.nim11
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)
efec4db451a75a1d25434b69cf50badad'>^
f196b71 ^
3794c62 ^

f196b71 ^







3794c62 ^
f196b71 ^
3794c62 ^





352cae4 ^
f196b71 ^
352cae4 ^
3794c62 ^
f196b71 ^

b38905b ^
a73a882 ^
3059c9c ^
3171371 ^
2c477cf ^


3171371 ^
2c477cf ^


















































a73a882 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100