about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-07-04 19:53:29 +0200
committerbptato <nincsnevem662@gmail.com>2024-07-04 19:53:29 +0200
commit2c087d701becb78efc0d40ddbb82e11641df6643 (patch)
treee81d2b43e72092c1b029b712b2252857cda02d13 /src
parentee4462ff4f18aad803d2740f40d911ef425a360e (diff)
downloadchawan-2c087d701becb78efc0d40ddbb82e11641df6643.tar.gz
config: add buffer.autofocus
Same as [[siteconf]] autofocus.
Diffstat (limited to 'src')
-rw-r--r--src/config/config.nim1
-rw-r--r--src/local/pager.nim1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/config/config.nim b/src/config/config.nim
index 4e9d1517..1ab77f01 100644
--- a/src/config/config.nim
+++ b/src/config/config.nim
@@ -147,6 +147,7 @@ type
     images* {.jsgetset.}: bool
     cookie* {.jsgetset.}: bool
     referer_from* {.jsgetset.}: bool
+    autofocus* {.jsgetset.}: bool
 
   Config* = ref object
     jsctx: JSContext
diff --git a/src/local/pager.nim b/src/local/pager.nim
index f3d4d79a..f6345dfb 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -1115,6 +1115,7 @@ proc applySiteconf(pager: Pager; url: var URL; charsetOverride: Charset;
     charsets: pager.config.encoding.document_charset,
     images: pager.config.buffer.images,
     styling: pager.config.buffer.styling,
+    autofocus: pager.config.buffer.autofocus,
     isdump: pager.config.start.headless,
     charsetOverride: charsetOverride,
     protocol: pager.config.protocol