From 68ad23321910c19c2e0f1387536417177fc414e4 Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 3 Mar 2020 14:56:32 -0500 Subject: print view: no message horizontal border --- lib/serve.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/serve.js') diff --git a/lib/serve.js b/lib/serve.js index 39c1138..0fef358 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -395,6 +395,7 @@ Serve.prototype.handle = function () { this.useOoo = this.query.ooo != null ? Boolean(this.query.ooo) : this.app.useOoo if (this.query.printView != null) { + this.printView = true this.noNav = true this.noFooter = true this.noComposer = true @@ -1717,6 +1718,7 @@ Serve.prototype.ifModified = function (lastMod) { } Serve.prototype.wrapMessages = function () { + var self = this return u.hyperwrap(function (content, cb) { cb(null, h('table.ssb-msgs', content)) }) @@ -1916,7 +1918,7 @@ Serve.prototype.wrapPage = function (title, searchQ) { h('style', styles()), h('link', {rel: 'stylesheet', href: render.toUrl('/highlight/foundation.css')}) ), - h('body', + h('body' + (self.printView ? '.print-view' : ''), self.noNav ? '' : h('nav.nav-bar', h('form', {action: render.toUrl('/search'), method: 'get'}, self.app.navLinks.map(function (link, i) { -- cgit v1.2.3