From 851474efc7094904dbbc2cfbfa9608b963192512 Mon Sep 17 00:00:00 2001 From: rien333 Date: Tue, 5 Jan 2021 14:05:11 +0100 Subject: [readability-js] horizontally align codeblock contents Before, the first line of a `code` element within a `pre` element had indentation/padding applied to it, creating the illusion that the line started with a space. Now, all the lines in `code` elements horizontally align. --- misc/userscripts/readability-js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/misc/userscripts/readability-js b/misc/userscripts/readability-js index 80a70a9f8..5f5c85a78 100755 --- a/misc/userscripts/readability-js +++ b/misc/userscripts/readability-js @@ -1,23 +1,23 @@ #!/usr/bin/env node -// +// // # Description -// +// // Summarize the current page in a new tab, by processing it with the standalone readability // library used for Firefox Reader View. -// +// // # Prerequisites -// -// - setting NODE_PATH might be required to point Qutebrowser to your global node libraries: +// +// - Setting NODE_PATH might be required to point qutebrowser to your global node libraries: // export NODE_PATH=$NODE_PATH:$(npm root -g) // - Mozilla's readability library (npm install -g @mozilla/readability) // - jsdom (npm install -g jsdom) // - qutejs (npm install -g qutejs) -// +// // # Usage -// +// // :spawn --userscript readability-js -// -// One may wish to define an easy to type command alias in Qutebrowser's configuration file: +// +// One may wish to define an easy to type command alias in qutebrowser's configuration file: // c.aliases = {"readability" : "spawn --userscript readability-js", ...} const { Readability } = require('@mozilla/readability'); @@ -76,6 +76,10 @@ const HEADER = ` margin: 0; background-color: #dddddd; } + pre > code { + padding-right: 0; + padding-left: 0; + } blockquote { border-inline-start: 2px solid grey !important; padding: 0; -- cgit v1.2.3-54-g00ecf