From d9e430c8147c8c2d81b4ca5405786269b2cfc94d Mon Sep 17 00:00:00 2001 From: bptato Date: Tue, 13 Dec 2022 00:04:50 +0100 Subject: Add all sorts of config options and cookies --- src/display/client.nim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/display/client.nim') diff --git a/src/display/client.nim b/src/display/client.nim index 7bf9a278..90945968 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -48,7 +48,7 @@ type pager {.jsget.}: Pager line {.jsget.}: LineEdit sevent: seq[Container] - config: Config + config {.jsget.}: Config jsrt: JSRuntime jsctx: JSContext timeoutid: int @@ -466,7 +466,9 @@ proc newClient*(config: Config, dispatcher: Dispatcher): Client = result.jsrt.setInterruptHandler(interruptHandler, cast[pointer](result)) let ctx = result.jsrt.newJSContext() result.jsctx = ctx - result.pager = newPager(config, result.attrs, dispatcher, result.config.getSiteConfig(ctx)) + result.pager = newPager(config, result.attrs, dispatcher, + result.config.getSiteConfig(ctx), + result.config.getOmniRules(ctx)) var global = ctx.getGlobalObject() ctx.registerType(Client, asglobal = true) global.setOpaque(result) @@ -481,5 +483,7 @@ proc newClient*(config: Config, dispatcher: Dispatcher): Client = ctx.addHTMLModule() ctx.addRequestModule() ctx.addLineEditModule() + ctx.addConfigModule() ctx.addPagerModule() ctx.addContainerModule() + ctx.addConfigModule() -- cgit 1.4.1-2-gfad0