grover 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grover/js/processor.js +9 -5
- data/lib/grover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7b3b3f08cd1bc34a419001834c4e598b0f1de7ef0f000feb5d65c3ef530c954
|
4
|
+
data.tar.gz: 4a92e62a4b3170aeded26631ea181fe9712f0bcaa483c38d168955875d09c955
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e232bf24b7094446e23cd4d3f5e7088593bdb3510d9b1589ae0f4148a4dc0bc82121542a597877eeb0b73280a1f867741c96e86b7af040cf1405c93b60fe22d
|
7
|
+
data.tar.gz: fd7f4107b126fec4fde6eee2be864c52536669f80ab8ae8719fa1025fb2dc4dd251cf89a4835aa5ef4e6118ea4e7bbc072661c54f306e80ae3ec8fa30506ef6f
|
data/lib/grover/js/processor.js
CHANGED
@@ -145,11 +145,15 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
|
|
145
145
|
// Request is some HTML content. Use request interception to assign the body
|
146
146
|
requestOptions.waitUntil = waitUntil || 'networkidle0';
|
147
147
|
await page.setRequestInterception(true);
|
148
|
-
|
149
|
-
|
150
|
-
//
|
151
|
-
|
152
|
-
|
148
|
+
let htmlIntercepted = false;
|
149
|
+
page.on('request', request => {
|
150
|
+
// We only want to intercept the first request - ie our HTML
|
151
|
+
if (htmlIntercepted)
|
152
|
+
request.continue();
|
153
|
+
else {
|
154
|
+
htmlIntercepted = true
|
155
|
+
request.respond({ body: urlOrHtml === '' ? ' ' : urlOrHtml });
|
156
|
+
}
|
153
157
|
});
|
154
158
|
const displayUrl = options.displayUrl; delete options.displayUrl;
|
155
159
|
await page.goto(displayUrl || 'http://example.com', requestOptions);
|
data/lib/grover/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Bromwich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: combine_pdf
|