summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrien333 <rien334@gmail.com>2021-01-05 14:05:11 +0100
committerrien333 <rien334@gmail.com>2021-01-05 14:05:11 +0100
commit851474efc7094904dbbc2cfbfa9608b963192512 (patch)
treec40ef17c7b7507acb4dff8a56e3e3f24b7d9d3f2
parent872e439cd922e798a8489bfdc7c6d4cb4ca9d8bc (diff)
downloadqutebrowser-851474efc7094904dbbc2cfbfa9608b963192512.tar.gz
qutebrowser-851474efc7094904dbbc2cfbfa9608b963192512.zip
[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.
-rwxr-xr-xmisc/userscripts/readability-js22
1 files 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;