grover 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/grover/js/processor.js +10 -10
- 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: c3d4e3648c63a1906a953202433b88805bd2d602d2d96d871debd4d251fc415e
|
4
|
+
data.tar.gz: 7756206771af66e2483c97933601bf74aa57bd2ac3cf8c2e2031c9c4cc0cc0fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 398afda3dd93724ef5699f1b2304eecee81ec5e1c1cbc2ca03ff5562c8506d2bb660848995c153ff652ad29b798a2156334d1963e3aa7e0a61a07df0d2860f48
|
7
|
+
data.tar.gz: 9c6d8a6641c6a0c3a193abd34b50f28086b9aecb78c661c186566c684543a0c8c4cce23c96b093739d44598d41db1613b483c8bc19f74a36cffefb140e01420a
|
data/lib/grover/js/processor.js
CHANGED
@@ -91,7 +91,7 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
|
|
91
91
|
// Emulate the media features, if specified
|
92
92
|
const mediaFeatures = options.mediaFeatures; delete options.mediaFeatures;
|
93
93
|
if (Array.isArray(mediaFeatures)) {
|
94
|
-
page.emulateMediaFeatures(mediaFeatures);
|
94
|
+
await page.emulateMediaFeatures(mediaFeatures);
|
95
95
|
}
|
96
96
|
|
97
97
|
// Emulate timezone (if provided)
|
@@ -100,28 +100,22 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
|
|
100
100
|
await page.emulateTimezone(timezone);
|
101
101
|
}
|
102
102
|
|
103
|
-
// Emulate vision deficiency (if provided)
|
104
|
-
const visionDeficiency = options.visionDeficiency; delete options.visionDeficiency;
|
105
|
-
if (visionDeficiency !== undefined) {
|
106
|
-
page.emulateVisionDeficiency(type);
|
107
|
-
}
|
108
|
-
|
109
103
|
// Bypass CSP (content security policy), if provided
|
110
104
|
const bypassCSP = options.bypassCSP; delete options.bypassCSP;
|
111
105
|
if (bypassCSP !== undefined) {
|
112
|
-
page.setBypassCSP(bypassCSP);
|
106
|
+
await page.setBypassCSP(bypassCSP);
|
113
107
|
}
|
114
108
|
|
115
109
|
// Add extra HTTP headers (if provided)
|
116
110
|
const extraHTTPHeaders = options.extraHTTPHeaders; delete options.extraHTTPHeaders;
|
117
111
|
if (extraHTTPHeaders !== undefined) {
|
118
|
-
page.setExtraHTTPHeaders(extraHTTPHeaders);
|
112
|
+
await page.setExtraHTTPHeaders(extraHTTPHeaders);
|
119
113
|
}
|
120
114
|
|
121
115
|
// Set geolocation (if provided)
|
122
116
|
const geolocation = options.geolocation; delete options.geolocation;
|
123
117
|
if (geolocation !== undefined) {
|
124
|
-
page.setGeolocation(geolocation);
|
118
|
+
await page.setGeolocation(geolocation);
|
125
119
|
}
|
126
120
|
|
127
121
|
const raiseOnRequestFailure = options.raiseOnRequestFailure; delete options.raiseOnRequestFailure;
|
@@ -201,6 +195,12 @@ const _processPage = (async (convertAction, urlOrHtml, options) => {
|
|
201
195
|
await page.waitForTimeout(waitForTimeout);
|
202
196
|
}
|
203
197
|
|
198
|
+
// Emulate vision deficiency (if provided)
|
199
|
+
const visionDeficiency = options.visionDeficiency; delete options.visionDeficiency;
|
200
|
+
if (visionDeficiency !== undefined) {
|
201
|
+
await page.emulateVisionDeficiency(visionDeficiency);
|
202
|
+
}
|
203
|
+
|
204
204
|
// If specified, focus on the specified selector
|
205
205
|
const focusSelector = options.focus; delete options.focus;
|
206
206
|
if (focusSelector !== undefined) {
|
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.5
|
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-08-
|
11
|
+
date: 2021-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: combine_pdf
|