@browserless/goto 9.4.1 → 9.5.0

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +1 -28
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@browserless/goto",
3
3
  "description": "Go to a page aborting unnecessary requests",
4
4
  "homepage": "https://browserless.js.org/#/?id=gotopage-options",
5
- "version": "9.4.1",
5
+ "version": "9.5.0",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -68,5 +68,5 @@
68
68
  "timeout": "2m",
69
69
  "verbose": true
70
70
  },
71
- "gitHead": "06e8bc03ec49cec34ae8462ae073180c26c93766"
71
+ "gitHead": "2efe5725e9b370366303e2ffc3d377436689d221"
72
72
  }
package/src/index.js CHANGED
@@ -92,10 +92,7 @@ const disableAnimations = `
92
92
  }
93
93
  `.trim()
94
94
 
95
- const inject = async (
96
- page,
97
- { timeout, mediaType, animations, hide, remove, modules, scripts, styles }
98
- ) => {
95
+ const inject = async (page, { timeout, mediaType, animations, modules, scripts, styles }) => {
99
96
  const postPromises = []
100
97
 
101
98
  if (mediaType) {
@@ -118,26 +115,6 @@ const inject = async (
118
115
  )
119
116
  }
120
117
 
121
- if (hide) {
122
- postPromises.push(
123
- run({
124
- fn: injectStyle(page, `${castArray(hide).join(', ')} { visibility: hidden !important; }`),
125
- timeout,
126
- debug: 'hide'
127
- })
128
- )
129
- }
130
-
131
- if (remove) {
132
- postPromises.push(
133
- run({
134
- fn: injectStyle(page, `${castArray(remove).join(', ')} { display: none !important; }`),
135
- timeout,
136
- debug: 'remove'
137
- })
138
- )
139
- }
140
-
141
118
  if (modules) {
142
119
  postPromises.push(
143
120
  run({
@@ -215,12 +192,10 @@ module.exports = ({
215
192
  click,
216
193
  colorScheme,
217
194
  headers = {},
218
- hide,
219
195
  html,
220
196
  javascript = true,
221
197
  mediaType,
222
198
  modules,
223
- remove,
224
199
  scripts,
225
200
  scroll,
226
201
  styles,
@@ -384,8 +359,6 @@ module.exports = ({
384
359
  timeout: actionTimeout,
385
360
  mediaType,
386
361
  animations,
387
- hide,
388
- remove,
389
362
  modules,
390
363
  scripts,
391
364
  styles