puppeteer-ruby 0.0.18 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +24 -1
- data/.github/workflows/reviewdog.yml +1 -1
- data/.rubocop.yml +50 -3
- data/Dockerfile +9 -0
- data/README.md +38 -0
- data/docker-compose.yml +34 -0
- data/lib/puppeteer.rb +15 -11
- data/lib/puppeteer/browser.rb +19 -26
- data/lib/puppeteer/browser_context.rb +48 -49
- data/lib/puppeteer/browser_runner.rb +20 -6
- data/lib/puppeteer/cdp_session.rb +21 -7
- data/lib/puppeteer/concurrent_ruby_utils.rb +18 -5
- data/lib/puppeteer/connection.rb +32 -13
- data/lib/puppeteer/debug_print.rb +1 -1
- data/lib/puppeteer/define_async_method.rb +1 -1
- data/lib/puppeteer/devices.rb +998 -849
- data/lib/puppeteer/dialog.rb +34 -0
- data/lib/puppeteer/dom_world.rb +2 -2
- data/lib/puppeteer/element_handle.rb +18 -1
- data/lib/puppeteer/env.rb +5 -0
- data/lib/puppeteer/event_callbackable.rb +4 -0
- data/lib/puppeteer/events.rb +184 -0
- data/lib/puppeteer/exception_details.rb +38 -0
- data/lib/puppeteer/frame.rb +1 -3
- data/lib/puppeteer/frame_manager.rb +20 -16
- data/lib/puppeteer/geolocation.rb +24 -0
- data/lib/puppeteer/keyboard/us_keyboard_layout.rb +2 -2
- data/lib/puppeteer/launcher.rb +11 -2
- data/lib/puppeteer/launcher/base.rb +14 -4
- data/lib/puppeteer/launcher/browser_options.rb +2 -1
- data/lib/puppeteer/launcher/chrome.rb +5 -9
- data/lib/puppeteer/launcher/firefox.rb +385 -0
- data/lib/puppeteer/lifecycle_watcher.rb +6 -6
- data/lib/puppeteer/network_manager.rb +6 -6
- data/lib/puppeteer/page.rb +87 -103
- data/lib/puppeteer/remote_object.rb +12 -1
- data/lib/puppeteer/target.rb +2 -2
- data/lib/puppeteer/version.rb +1 -1
- data/puppeteer-ruby.gemspec +1 -1
- metadata +11 -4
@@ -14,16 +14,24 @@ class Puppeteer::BrowserRunner
|
|
14
14
|
@proc = nil
|
15
15
|
@connection = nil
|
16
16
|
@closed = true
|
17
|
-
@listeners = []
|
18
17
|
end
|
19
18
|
|
20
19
|
attr_reader :proc, :connection
|
21
20
|
|
22
21
|
class BrowserProcess
|
23
22
|
def initialize(env, executable_path, args)
|
23
|
+
@spawnargs =
|
24
|
+
if args && !args.empty?
|
25
|
+
[executable_path] + args
|
26
|
+
else
|
27
|
+
[executable_path]
|
28
|
+
end
|
29
|
+
|
24
30
|
stdin, @stdout, @stderr, @thread = Open3.popen3(env, executable_path, *args)
|
25
31
|
stdin.close
|
26
32
|
@pid = @thread.pid
|
33
|
+
rescue Errno::ENOENT => err
|
34
|
+
raise LaunchError.new(err.message)
|
27
35
|
end
|
28
36
|
|
29
37
|
def kill
|
@@ -37,7 +45,13 @@ class Puppeteer::BrowserRunner
|
|
37
45
|
@thread.join
|
38
46
|
end
|
39
47
|
|
40
|
-
attr_reader :stdout, :stderr
|
48
|
+
attr_reader :stdout, :stderr, :spawnargs
|
49
|
+
end
|
50
|
+
|
51
|
+
class LaunchError < StandardError
|
52
|
+
def initialize(reason)
|
53
|
+
super("Failed to launch browser! #{reason}")
|
54
|
+
end
|
41
55
|
end
|
42
56
|
|
43
57
|
# @param {!(Launcher.LaunchOptions)=} options
|
@@ -123,12 +137,12 @@ class Puppeteer::BrowserRunner
|
|
123
137
|
|
124
138
|
# @return {Promise}
|
125
139
|
def kill
|
126
|
-
unless @closed
|
127
|
-
@proc.kill
|
128
|
-
end
|
129
140
|
if @temp_directory
|
130
141
|
FileUtils.rm_rf(@temp_directory)
|
131
142
|
end
|
143
|
+
unless @closed
|
144
|
+
@proc.kill
|
145
|
+
end
|
132
146
|
end
|
133
147
|
|
134
148
|
|
@@ -156,6 +170,6 @@ class Puppeteer::BrowserRunner
|
|
156
170
|
end
|
157
171
|
end
|
158
172
|
rescue Timeout::Error
|
159
|
-
raise Puppeteer::TimeoutError.new("Timed out after #{timeout} ms while trying to connect to the browser! Only Chrome at revision r#{
|
173
|
+
raise Puppeteer::TimeoutError.new("Timed out after #{timeout} ms while trying to connect to the browser! Only Chrome at revision r#{preferred_revision} is guaranteed to work.")
|
160
174
|
end
|
161
175
|
end
|
@@ -9,7 +9,7 @@ class Puppeteer::CDPSession
|
|
9
9
|
# @param {string} targetType
|
10
10
|
# @param {string} sessionId
|
11
11
|
def initialize(connection, target_type, session_id)
|
12
|
-
@callbacks =
|
12
|
+
@callbacks = Concurrent::Hash.new
|
13
13
|
@connection = connection
|
14
14
|
@target_type = target_type
|
15
15
|
@session_id = session_id
|
@@ -31,10 +31,14 @@ class Puppeteer::CDPSession
|
|
31
31
|
if !@connection
|
32
32
|
raise Error.new("Protocol error (#{method}): Session closed. Most likely the #{@target_type} has been closed.")
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
promise = resolvable_future
|
36
|
-
|
37
|
-
@
|
36
|
+
|
37
|
+
@connection.generate_id do |id|
|
38
|
+
@callbacks[id] = Puppeteer::Connection::MessageCallback.new(method: method, promise: promise)
|
39
|
+
@connection.raw_send(id: id, message: { sessionId: @session_id, method: method, params: params })
|
40
|
+
end
|
41
|
+
|
38
42
|
promise
|
39
43
|
end
|
40
44
|
|
@@ -44,10 +48,10 @@ class Puppeteer::CDPSession
|
|
44
48
|
if callback = @callbacks.delete(message['id'])
|
45
49
|
callback_with_message(callback, message)
|
46
50
|
else
|
47
|
-
raise Error.new("unknown id: #{id}")
|
51
|
+
raise Error.new("unknown id: #{message['id']}")
|
48
52
|
end
|
49
53
|
else
|
50
|
-
emit_event
|
54
|
+
emit_event(message['method'], message['params'])
|
51
55
|
end
|
52
56
|
end
|
53
57
|
|
@@ -79,6 +83,16 @@ class Puppeteer::CDPSession
|
|
79
83
|
end
|
80
84
|
@callbacks.clear
|
81
85
|
@connection = nil
|
82
|
-
emit_event
|
86
|
+
emit_event(CDPSessionEmittedEvents::Disconnected)
|
87
|
+
end
|
88
|
+
|
89
|
+
# @param event_name [String]
|
90
|
+
def on(event_name, &block)
|
91
|
+
add_event_listener(event_name, &block)
|
92
|
+
end
|
93
|
+
|
94
|
+
# @param event_name [String]
|
95
|
+
def once(event_name, &block)
|
96
|
+
observe_first(event_name, &block)
|
83
97
|
end
|
84
98
|
end
|
@@ -4,9 +4,13 @@ module Puppeteer::ConcurrentRubyUtils
|
|
4
4
|
# REMARK: This method doesn't assure the order of calling.
|
5
5
|
# for example, await_all(async1, async2) calls calls2 -> calls1 often.
|
6
6
|
def await_all(*args)
|
7
|
-
if args.length == 1 && args
|
8
|
-
|
7
|
+
if args.length == 1 && args.first.is_a?(Enumerable)
|
8
|
+
await_all(*args.first)
|
9
9
|
else
|
10
|
+
if args.any? { |arg| !arg.is_a?(Concurrent::Promises::Future) }
|
11
|
+
raise ArgumentError.new("All argument must be a Future: #{args}")
|
12
|
+
end
|
13
|
+
|
10
14
|
Concurrent::Promises.zip(*args).value!
|
11
15
|
end
|
12
16
|
end
|
@@ -15,9 +19,13 @@ module Puppeteer::ConcurrentRubyUtils
|
|
15
19
|
# REMARK: This method doesn't assure the order of calling.
|
16
20
|
# for example, await_all(async1, async2) calls calls2 -> calls1 often.
|
17
21
|
def await_any(*args)
|
18
|
-
if args.length == 1 && args
|
19
|
-
|
22
|
+
if args.length == 1 && args.first.is_a?(Enumerable)
|
23
|
+
await_any(*args.first)
|
20
24
|
else
|
25
|
+
if args.any? { |arg| !arg.is_a?(Concurrent::Promises::Future) }
|
26
|
+
raise ArgumentError.new("All argument must be a Future: #{args}")
|
27
|
+
end
|
28
|
+
|
21
29
|
Concurrent::Promises.any(*args).value!
|
22
30
|
end
|
23
31
|
end
|
@@ -32,7 +40,12 @@ module Puppeteer::ConcurrentRubyUtils
|
|
32
40
|
end
|
33
41
|
|
34
42
|
def future(&block)
|
35
|
-
Concurrent::Promises.future
|
43
|
+
Concurrent::Promises.future do
|
44
|
+
block.call
|
45
|
+
rescue => err
|
46
|
+
Logger.new($stderr).warn(err)
|
47
|
+
raise err
|
48
|
+
end
|
36
49
|
end
|
37
50
|
|
38
51
|
def resolvable_future(&block)
|
data/lib/puppeteer/connection.rb
CHANGED
@@ -39,7 +39,7 @@ class Puppeteer::Connection
|
|
39
39
|
def initialize(url, transport, delay = 0)
|
40
40
|
@url = url
|
41
41
|
@last_id = 0
|
42
|
-
@callbacks =
|
42
|
+
@callbacks = Concurrent::Hash.new
|
43
43
|
@delay = delay
|
44
44
|
|
45
45
|
@transport = transport
|
@@ -52,7 +52,7 @@ class Puppeteer::Connection
|
|
52
52
|
handle_close
|
53
53
|
end
|
54
54
|
|
55
|
-
@sessions =
|
55
|
+
@sessions = Concurrent::Hash.new
|
56
56
|
@closed = false
|
57
57
|
end
|
58
58
|
|
@@ -92,22 +92,41 @@ class Puppeteer::Connection
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def async_send_message(method, params = {})
|
95
|
-
id = raw_send(message: { method: method, params: params })
|
96
95
|
promise = resolvable_future
|
97
|
-
|
96
|
+
|
97
|
+
generate_id do |id|
|
98
|
+
@callbacks[id] = MessageCallback.new(method: method, promise: promise)
|
99
|
+
raw_send(id: id, message: { method: method, params: params })
|
100
|
+
end
|
101
|
+
|
98
102
|
promise
|
99
103
|
end
|
100
104
|
|
101
|
-
private
|
102
|
-
|
105
|
+
# package private. not intended to use externally.
|
106
|
+
#
|
107
|
+
# ```usage
|
108
|
+
# connection.generate_id do |generated_id|
|
109
|
+
# # play with generated_id
|
110
|
+
# end
|
111
|
+
# ````
|
112
|
+
#
|
113
|
+
def generate_id(&block)
|
114
|
+
block.call(@last_id += 1)
|
103
115
|
end
|
104
116
|
|
105
|
-
|
106
|
-
|
117
|
+
# package private. not intended to use externally.
|
118
|
+
def raw_send(id:, message:)
|
119
|
+
# In original puppeteer (JS) implementation,
|
120
|
+
# id is generated here using #generate_id and the id argument is not passed to #raw_send.
|
121
|
+
#
|
122
|
+
# However with concurrent-ruby, '#handle_message' is sometimes called
|
123
|
+
# just soon after @transport.send_text and **before returning the id.**
|
124
|
+
#
|
125
|
+
# So we have to know the message id in advance before send_text.
|
126
|
+
#
|
107
127
|
payload = JSON.fast_generate(message.compact.merge(id: id))
|
108
128
|
@transport.send_text(payload)
|
109
129
|
request_debug_printer.handle_payload(payload)
|
110
|
-
id
|
111
130
|
end
|
112
131
|
|
113
132
|
# Just for effective debugging :)
|
@@ -204,14 +223,14 @@ class Puppeteer::Connection
|
|
204
223
|
callback.reject(
|
205
224
|
ProtocolError.new(
|
206
225
|
method: callback.method,
|
207
|
-
error_message:
|
208
|
-
error_data:
|
226
|
+
error_message: message['error']['message'],
|
227
|
+
error_data: message['error']['data']))
|
209
228
|
else
|
210
229
|
callback.resolve(message['result'])
|
211
230
|
end
|
212
231
|
end
|
213
232
|
else
|
214
|
-
emit_event
|
233
|
+
emit_event(message['method'], message['params'])
|
215
234
|
end
|
216
235
|
end
|
217
236
|
|
@@ -233,7 +252,7 @@ class Puppeteer::Connection
|
|
233
252
|
session.handle_closed
|
234
253
|
end
|
235
254
|
@sessions.clear
|
236
|
-
emit_event
|
255
|
+
emit_event(ConnectionEmittedEvents::Disconnected)
|
237
256
|
end
|
238
257
|
|
239
258
|
def on_close(&block)
|
data/lib/puppeteer/devices.rb
CHANGED
@@ -1,855 +1,1004 @@
|
|
1
1
|
Puppeteer::DEVICES = Hash[
|
2
2
|
[
|
3
3
|
{
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
'
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
'
|
31
|
-
|
32
|
-
'
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
'
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
'
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
'
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
'
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
},
|
158
|
-
},
|
159
|
-
{
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
'
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
'
|
187
|
-
|
188
|
-
'
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
'
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
'
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
'
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
'
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
},
|
314
|
-
},
|
315
|
-
{
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
'
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
'
|
343
|
-
|
344
|
-
'
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
'
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
'
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
'
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
'
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
},
|
470
|
-
},
|
471
|
-
{
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
'
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
'
|
499
|
-
|
500
|
-
'
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
'
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
'
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
'
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
'
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
},
|
626
|
-
},
|
627
|
-
{
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
'
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
'
|
655
|
-
|
656
|
-
'
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
'
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
'
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
'
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
'
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
},
|
782
|
-
},
|
783
|
-
{
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
'
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
'
|
811
|
-
|
812
|
-
'
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
'
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
'
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
'
|
852
|
-
|
4
|
+
name: 'Blackberry PlayBook',
|
5
|
+
userAgent:
|
6
|
+
'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+',
|
7
|
+
viewport: {
|
8
|
+
width: 600,
|
9
|
+
height: 1024,
|
10
|
+
deviceScaleFactor: 1,
|
11
|
+
isMobile: true,
|
12
|
+
hasTouch: true,
|
13
|
+
isLandscape: false,
|
14
|
+
},
|
15
|
+
},
|
16
|
+
{
|
17
|
+
name: 'Blackberry PlayBook landscape',
|
18
|
+
userAgent:
|
19
|
+
'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+',
|
20
|
+
viewport: {
|
21
|
+
width: 1024,
|
22
|
+
height: 600,
|
23
|
+
deviceScaleFactor: 1,
|
24
|
+
isMobile: true,
|
25
|
+
hasTouch: true,
|
26
|
+
isLandscape: true,
|
27
|
+
},
|
28
|
+
},
|
29
|
+
{
|
30
|
+
name: 'BlackBerry Z30',
|
31
|
+
userAgent:
|
32
|
+
'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+',
|
33
|
+
viewport: {
|
34
|
+
width: 360,
|
35
|
+
height: 640,
|
36
|
+
deviceScaleFactor: 2,
|
37
|
+
isMobile: true,
|
38
|
+
hasTouch: true,
|
39
|
+
isLandscape: false,
|
40
|
+
},
|
41
|
+
},
|
42
|
+
{
|
43
|
+
name: 'BlackBerry Z30 landscape',
|
44
|
+
userAgent:
|
45
|
+
'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+',
|
46
|
+
viewport: {
|
47
|
+
width: 640,
|
48
|
+
height: 360,
|
49
|
+
deviceScaleFactor: 2,
|
50
|
+
isMobile: true,
|
51
|
+
hasTouch: true,
|
52
|
+
isLandscape: true,
|
53
|
+
},
|
54
|
+
},
|
55
|
+
{
|
56
|
+
name: 'Galaxy Note 3',
|
57
|
+
userAgent:
|
58
|
+
'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
|
59
|
+
viewport: {
|
60
|
+
width: 360,
|
61
|
+
height: 640,
|
62
|
+
deviceScaleFactor: 3,
|
63
|
+
isMobile: true,
|
64
|
+
hasTouch: true,
|
65
|
+
isLandscape: false,
|
66
|
+
},
|
67
|
+
},
|
68
|
+
{
|
69
|
+
name: 'Galaxy Note 3 landscape',
|
70
|
+
userAgent:
|
71
|
+
'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
|
72
|
+
viewport: {
|
73
|
+
width: 640,
|
74
|
+
height: 360,
|
75
|
+
deviceScaleFactor: 3,
|
76
|
+
isMobile: true,
|
77
|
+
hasTouch: true,
|
78
|
+
isLandscape: true,
|
79
|
+
},
|
80
|
+
},
|
81
|
+
{
|
82
|
+
name: 'Galaxy Note II',
|
83
|
+
userAgent:
|
84
|
+
'Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
|
85
|
+
viewport: {
|
86
|
+
width: 360,
|
87
|
+
height: 640,
|
88
|
+
deviceScaleFactor: 2,
|
89
|
+
isMobile: true,
|
90
|
+
hasTouch: true,
|
91
|
+
isLandscape: false,
|
92
|
+
},
|
93
|
+
},
|
94
|
+
{
|
95
|
+
name: 'Galaxy Note II landscape',
|
96
|
+
userAgent:
|
97
|
+
'Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
|
98
|
+
viewport: {
|
99
|
+
width: 640,
|
100
|
+
height: 360,
|
101
|
+
deviceScaleFactor: 2,
|
102
|
+
isMobile: true,
|
103
|
+
hasTouch: true,
|
104
|
+
isLandscape: true,
|
105
|
+
},
|
106
|
+
},
|
107
|
+
{
|
108
|
+
name: 'Galaxy S III',
|
109
|
+
userAgent:
|
110
|
+
'Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
|
111
|
+
viewport: {
|
112
|
+
width: 360,
|
113
|
+
height: 640,
|
114
|
+
deviceScaleFactor: 2,
|
115
|
+
isMobile: true,
|
116
|
+
hasTouch: true,
|
117
|
+
isLandscape: false,
|
118
|
+
},
|
119
|
+
},
|
120
|
+
{
|
121
|
+
name: 'Galaxy S III landscape',
|
122
|
+
userAgent:
|
123
|
+
'Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30',
|
124
|
+
viewport: {
|
125
|
+
width: 640,
|
126
|
+
height: 360,
|
127
|
+
deviceScaleFactor: 2,
|
128
|
+
isMobile: true,
|
129
|
+
hasTouch: true,
|
130
|
+
isLandscape: true,
|
131
|
+
},
|
132
|
+
},
|
133
|
+
{
|
134
|
+
name: 'Galaxy S5',
|
135
|
+
userAgent:
|
136
|
+
'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
137
|
+
viewport: {
|
138
|
+
width: 360,
|
139
|
+
height: 640,
|
140
|
+
deviceScaleFactor: 3,
|
141
|
+
isMobile: true,
|
142
|
+
hasTouch: true,
|
143
|
+
isLandscape: false,
|
144
|
+
},
|
145
|
+
},
|
146
|
+
{
|
147
|
+
name: 'Galaxy S5 landscape',
|
148
|
+
userAgent:
|
149
|
+
'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
150
|
+
viewport: {
|
151
|
+
width: 640,
|
152
|
+
height: 360,
|
153
|
+
deviceScaleFactor: 3,
|
154
|
+
isMobile: true,
|
155
|
+
hasTouch: true,
|
156
|
+
isLandscape: true,
|
157
|
+
},
|
158
|
+
},
|
159
|
+
{
|
160
|
+
name: 'iPad',
|
161
|
+
userAgent:
|
162
|
+
'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1',
|
163
|
+
viewport: {
|
164
|
+
width: 768,
|
165
|
+
height: 1024,
|
166
|
+
deviceScaleFactor: 2,
|
167
|
+
isMobile: true,
|
168
|
+
hasTouch: true,
|
169
|
+
isLandscape: false,
|
170
|
+
},
|
171
|
+
},
|
172
|
+
{
|
173
|
+
name: 'iPad landscape',
|
174
|
+
userAgent:
|
175
|
+
'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1',
|
176
|
+
viewport: {
|
177
|
+
width: 1024,
|
178
|
+
height: 768,
|
179
|
+
deviceScaleFactor: 2,
|
180
|
+
isMobile: true,
|
181
|
+
hasTouch: true,
|
182
|
+
isLandscape: true,
|
183
|
+
},
|
184
|
+
},
|
185
|
+
{
|
186
|
+
name: 'iPad Mini',
|
187
|
+
userAgent:
|
188
|
+
'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1',
|
189
|
+
viewport: {
|
190
|
+
width: 768,
|
191
|
+
height: 1024,
|
192
|
+
deviceScaleFactor: 2,
|
193
|
+
isMobile: true,
|
194
|
+
hasTouch: true,
|
195
|
+
isLandscape: false,
|
196
|
+
},
|
197
|
+
},
|
198
|
+
{
|
199
|
+
name: 'iPad Mini landscape',
|
200
|
+
userAgent:
|
201
|
+
'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1',
|
202
|
+
viewport: {
|
203
|
+
width: 1024,
|
204
|
+
height: 768,
|
205
|
+
deviceScaleFactor: 2,
|
206
|
+
isMobile: true,
|
207
|
+
hasTouch: true,
|
208
|
+
isLandscape: true,
|
209
|
+
},
|
210
|
+
},
|
211
|
+
{
|
212
|
+
name: 'iPad Pro',
|
213
|
+
userAgent:
|
214
|
+
'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1',
|
215
|
+
viewport: {
|
216
|
+
width: 1024,
|
217
|
+
height: 1366,
|
218
|
+
deviceScaleFactor: 2,
|
219
|
+
isMobile: true,
|
220
|
+
hasTouch: true,
|
221
|
+
isLandscape: false,
|
222
|
+
},
|
223
|
+
},
|
224
|
+
{
|
225
|
+
name: 'iPad Pro landscape',
|
226
|
+
userAgent:
|
227
|
+
'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1',
|
228
|
+
viewport: {
|
229
|
+
width: 1366,
|
230
|
+
height: 1024,
|
231
|
+
deviceScaleFactor: 2,
|
232
|
+
isMobile: true,
|
233
|
+
hasTouch: true,
|
234
|
+
isLandscape: true,
|
235
|
+
},
|
236
|
+
},
|
237
|
+
{
|
238
|
+
name: 'iPhone 4',
|
239
|
+
userAgent:
|
240
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
241
|
+
viewport: {
|
242
|
+
width: 320,
|
243
|
+
height: 480,
|
244
|
+
deviceScaleFactor: 2,
|
245
|
+
isMobile: true,
|
246
|
+
hasTouch: true,
|
247
|
+
isLandscape: false,
|
248
|
+
},
|
249
|
+
},
|
250
|
+
{
|
251
|
+
name: 'iPhone 4 landscape',
|
252
|
+
userAgent:
|
253
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
254
|
+
viewport: {
|
255
|
+
width: 480,
|
256
|
+
height: 320,
|
257
|
+
deviceScaleFactor: 2,
|
258
|
+
isMobile: true,
|
259
|
+
hasTouch: true,
|
260
|
+
isLandscape: true,
|
261
|
+
},
|
262
|
+
},
|
263
|
+
{
|
264
|
+
name: 'iPhone 5',
|
265
|
+
userAgent:
|
266
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
|
267
|
+
viewport: {
|
268
|
+
width: 320,
|
269
|
+
height: 568,
|
270
|
+
deviceScaleFactor: 2,
|
271
|
+
isMobile: true,
|
272
|
+
hasTouch: true,
|
273
|
+
isLandscape: false,
|
274
|
+
},
|
275
|
+
},
|
276
|
+
{
|
277
|
+
name: 'iPhone 5 landscape',
|
278
|
+
userAgent:
|
279
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
|
280
|
+
viewport: {
|
281
|
+
width: 568,
|
282
|
+
height: 320,
|
283
|
+
deviceScaleFactor: 2,
|
284
|
+
isMobile: true,
|
285
|
+
hasTouch: true,
|
286
|
+
isLandscape: true,
|
287
|
+
},
|
288
|
+
},
|
289
|
+
{
|
290
|
+
name: 'iPhone 6',
|
291
|
+
userAgent:
|
292
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
293
|
+
viewport: {
|
294
|
+
width: 375,
|
295
|
+
height: 667,
|
296
|
+
deviceScaleFactor: 2,
|
297
|
+
isMobile: true,
|
298
|
+
hasTouch: true,
|
299
|
+
isLandscape: false,
|
300
|
+
},
|
301
|
+
},
|
302
|
+
{
|
303
|
+
name: 'iPhone 6 landscape',
|
304
|
+
userAgent:
|
305
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
306
|
+
viewport: {
|
307
|
+
width: 667,
|
308
|
+
height: 375,
|
309
|
+
deviceScaleFactor: 2,
|
310
|
+
isMobile: true,
|
311
|
+
hasTouch: true,
|
312
|
+
isLandscape: true,
|
313
|
+
},
|
314
|
+
},
|
315
|
+
{
|
316
|
+
name: 'iPhone 6 Plus',
|
317
|
+
userAgent:
|
318
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
319
|
+
viewport: {
|
320
|
+
width: 414,
|
321
|
+
height: 736,
|
322
|
+
deviceScaleFactor: 3,
|
323
|
+
isMobile: true,
|
324
|
+
hasTouch: true,
|
325
|
+
isLandscape: false,
|
326
|
+
},
|
327
|
+
},
|
328
|
+
{
|
329
|
+
name: 'iPhone 6 Plus landscape',
|
330
|
+
userAgent:
|
331
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
332
|
+
viewport: {
|
333
|
+
width: 736,
|
334
|
+
height: 414,
|
335
|
+
deviceScaleFactor: 3,
|
336
|
+
isMobile: true,
|
337
|
+
hasTouch: true,
|
338
|
+
isLandscape: true,
|
339
|
+
},
|
340
|
+
},
|
341
|
+
{
|
342
|
+
name: 'iPhone 7',
|
343
|
+
userAgent:
|
344
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
345
|
+
viewport: {
|
346
|
+
width: 375,
|
347
|
+
height: 667,
|
348
|
+
deviceScaleFactor: 2,
|
349
|
+
isMobile: true,
|
350
|
+
hasTouch: true,
|
351
|
+
isLandscape: false,
|
352
|
+
},
|
353
|
+
},
|
354
|
+
{
|
355
|
+
name: 'iPhone 7 landscape',
|
356
|
+
userAgent:
|
357
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
358
|
+
viewport: {
|
359
|
+
width: 667,
|
360
|
+
height: 375,
|
361
|
+
deviceScaleFactor: 2,
|
362
|
+
isMobile: true,
|
363
|
+
hasTouch: true,
|
364
|
+
isLandscape: true,
|
365
|
+
},
|
366
|
+
},
|
367
|
+
{
|
368
|
+
name: 'iPhone 7 Plus',
|
369
|
+
userAgent:
|
370
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
371
|
+
viewport: {
|
372
|
+
width: 414,
|
373
|
+
height: 736,
|
374
|
+
deviceScaleFactor: 3,
|
375
|
+
isMobile: true,
|
376
|
+
hasTouch: true,
|
377
|
+
isLandscape: false,
|
378
|
+
},
|
379
|
+
},
|
380
|
+
{
|
381
|
+
name: 'iPhone 7 Plus landscape',
|
382
|
+
userAgent:
|
383
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
384
|
+
viewport: {
|
385
|
+
width: 736,
|
386
|
+
height: 414,
|
387
|
+
deviceScaleFactor: 3,
|
388
|
+
isMobile: true,
|
389
|
+
hasTouch: true,
|
390
|
+
isLandscape: true,
|
391
|
+
},
|
392
|
+
},
|
393
|
+
{
|
394
|
+
name: 'iPhone 8',
|
395
|
+
userAgent:
|
396
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
397
|
+
viewport: {
|
398
|
+
width: 375,
|
399
|
+
height: 667,
|
400
|
+
deviceScaleFactor: 2,
|
401
|
+
isMobile: true,
|
402
|
+
hasTouch: true,
|
403
|
+
isLandscape: false,
|
404
|
+
},
|
405
|
+
},
|
406
|
+
{
|
407
|
+
name: 'iPhone 8 landscape',
|
408
|
+
userAgent:
|
409
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
410
|
+
viewport: {
|
411
|
+
width: 667,
|
412
|
+
height: 375,
|
413
|
+
deviceScaleFactor: 2,
|
414
|
+
isMobile: true,
|
415
|
+
hasTouch: true,
|
416
|
+
isLandscape: true,
|
417
|
+
},
|
418
|
+
},
|
419
|
+
{
|
420
|
+
name: 'iPhone 8 Plus',
|
421
|
+
userAgent:
|
422
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
423
|
+
viewport: {
|
424
|
+
width: 414,
|
425
|
+
height: 736,
|
426
|
+
deviceScaleFactor: 3,
|
427
|
+
isMobile: true,
|
428
|
+
hasTouch: true,
|
429
|
+
isLandscape: false,
|
430
|
+
},
|
431
|
+
},
|
432
|
+
{
|
433
|
+
name: 'iPhone 8 Plus landscape',
|
434
|
+
userAgent:
|
435
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
436
|
+
viewport: {
|
437
|
+
width: 736,
|
438
|
+
height: 414,
|
439
|
+
deviceScaleFactor: 3,
|
440
|
+
isMobile: true,
|
441
|
+
hasTouch: true,
|
442
|
+
isLandscape: true,
|
443
|
+
},
|
444
|
+
},
|
445
|
+
{
|
446
|
+
name: 'iPhone SE',
|
447
|
+
userAgent:
|
448
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
|
449
|
+
viewport: {
|
450
|
+
width: 320,
|
451
|
+
height: 568,
|
452
|
+
deviceScaleFactor: 2,
|
453
|
+
isMobile: true,
|
454
|
+
hasTouch: true,
|
455
|
+
isLandscape: false,
|
456
|
+
},
|
457
|
+
},
|
458
|
+
{
|
459
|
+
name: 'iPhone SE landscape',
|
460
|
+
userAgent:
|
461
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
|
462
|
+
viewport: {
|
463
|
+
width: 568,
|
464
|
+
height: 320,
|
465
|
+
deviceScaleFactor: 2,
|
466
|
+
isMobile: true,
|
467
|
+
hasTouch: true,
|
468
|
+
isLandscape: true,
|
469
|
+
},
|
470
|
+
},
|
471
|
+
{
|
472
|
+
name: 'iPhone X',
|
473
|
+
userAgent:
|
474
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
475
|
+
viewport: {
|
476
|
+
width: 375,
|
477
|
+
height: 812,
|
478
|
+
deviceScaleFactor: 3,
|
479
|
+
isMobile: true,
|
480
|
+
hasTouch: true,
|
481
|
+
isLandscape: false,
|
482
|
+
},
|
483
|
+
},
|
484
|
+
{
|
485
|
+
name: 'iPhone X landscape',
|
486
|
+
userAgent:
|
487
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
|
488
|
+
viewport: {
|
489
|
+
width: 812,
|
490
|
+
height: 375,
|
491
|
+
deviceScaleFactor: 3,
|
492
|
+
isMobile: true,
|
493
|
+
hasTouch: true,
|
494
|
+
isLandscape: true,
|
495
|
+
},
|
496
|
+
},
|
497
|
+
{
|
498
|
+
name: 'iPhone XR',
|
499
|
+
userAgent:
|
500
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1',
|
501
|
+
viewport: {
|
502
|
+
width: 414,
|
503
|
+
height: 896,
|
504
|
+
deviceScaleFactor: 3,
|
505
|
+
isMobile: true,
|
506
|
+
hasTouch: true,
|
507
|
+
isLandscape: false,
|
508
|
+
},
|
509
|
+
},
|
510
|
+
{
|
511
|
+
name: 'iPhone XR landscape',
|
512
|
+
userAgent:
|
513
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1',
|
514
|
+
viewport: {
|
515
|
+
width: 896,
|
516
|
+
height: 414,
|
517
|
+
deviceScaleFactor: 3,
|
518
|
+
isMobile: true,
|
519
|
+
hasTouch: true,
|
520
|
+
isLandscape: true,
|
521
|
+
},
|
522
|
+
},
|
523
|
+
{
|
524
|
+
name: 'iPhone 11',
|
525
|
+
userAgent:
|
526
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1',
|
527
|
+
viewport: {
|
528
|
+
width: 414,
|
529
|
+
height: 828,
|
530
|
+
deviceScaleFactor: 2,
|
531
|
+
isMobile: true,
|
532
|
+
hasTouch: true,
|
533
|
+
isLandscape: false,
|
534
|
+
},
|
535
|
+
},
|
536
|
+
{
|
537
|
+
name: 'iPhone 11 landscape',
|
538
|
+
userAgent:
|
539
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1',
|
540
|
+
viewport: {
|
541
|
+
width: 828,
|
542
|
+
height: 414,
|
543
|
+
deviceScaleFactor: 2,
|
544
|
+
isMobile: true,
|
545
|
+
hasTouch: true,
|
546
|
+
isLandscape: true,
|
547
|
+
},
|
548
|
+
},
|
549
|
+
{
|
550
|
+
name: 'iPhone 11 Pro',
|
551
|
+
userAgent:
|
552
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1',
|
553
|
+
viewport: {
|
554
|
+
width: 375,
|
555
|
+
height: 812,
|
556
|
+
deviceScaleFactor: 3,
|
557
|
+
isMobile: true,
|
558
|
+
hasTouch: true,
|
559
|
+
isLandscape: false,
|
560
|
+
},
|
561
|
+
},
|
562
|
+
{
|
563
|
+
name: 'iPhone 11 Pro landscape',
|
564
|
+
userAgent:
|
565
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1',
|
566
|
+
viewport: {
|
567
|
+
width: 812,
|
568
|
+
height: 375,
|
569
|
+
deviceScaleFactor: 3,
|
570
|
+
isMobile: true,
|
571
|
+
hasTouch: true,
|
572
|
+
isLandscape: true,
|
573
|
+
},
|
574
|
+
},
|
575
|
+
{
|
576
|
+
name: 'iPhone 11 Pro Max',
|
577
|
+
userAgent:
|
578
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1',
|
579
|
+
viewport: {
|
580
|
+
width: 414,
|
581
|
+
height: 896,
|
582
|
+
deviceScaleFactor: 3,
|
583
|
+
isMobile: true,
|
584
|
+
hasTouch: true,
|
585
|
+
isLandscape: false,
|
586
|
+
},
|
587
|
+
},
|
588
|
+
{
|
589
|
+
name: 'iPhone 11 Pro Max landscape',
|
590
|
+
userAgent:
|
591
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1',
|
592
|
+
viewport: {
|
593
|
+
width: 896,
|
594
|
+
height: 414,
|
595
|
+
deviceScaleFactor: 3,
|
596
|
+
isMobile: true,
|
597
|
+
hasTouch: true,
|
598
|
+
isLandscape: true,
|
599
|
+
},
|
600
|
+
},
|
601
|
+
{
|
602
|
+
name: 'JioPhone 2',
|
603
|
+
userAgent:
|
604
|
+
'Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5',
|
605
|
+
viewport: {
|
606
|
+
width: 240,
|
607
|
+
height: 320,
|
608
|
+
deviceScaleFactor: 1,
|
609
|
+
isMobile: true,
|
610
|
+
hasTouch: true,
|
611
|
+
isLandscape: false,
|
612
|
+
},
|
613
|
+
},
|
614
|
+
{
|
615
|
+
name: 'JioPhone 2 landscape',
|
616
|
+
userAgent:
|
617
|
+
'Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5',
|
618
|
+
viewport: {
|
619
|
+
width: 320,
|
620
|
+
height: 240,
|
621
|
+
deviceScaleFactor: 1,
|
622
|
+
isMobile: true,
|
623
|
+
hasTouch: true,
|
624
|
+
isLandscape: true,
|
625
|
+
},
|
626
|
+
},
|
627
|
+
{
|
628
|
+
name: 'Kindle Fire HDX',
|
629
|
+
userAgent:
|
630
|
+
'Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true',
|
631
|
+
viewport: {
|
632
|
+
width: 800,
|
633
|
+
height: 1280,
|
634
|
+
deviceScaleFactor: 2,
|
635
|
+
isMobile: true,
|
636
|
+
hasTouch: true,
|
637
|
+
isLandscape: false,
|
638
|
+
},
|
639
|
+
},
|
640
|
+
{
|
641
|
+
name: 'Kindle Fire HDX landscape',
|
642
|
+
userAgent:
|
643
|
+
'Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true',
|
644
|
+
viewport: {
|
645
|
+
width: 1280,
|
646
|
+
height: 800,
|
647
|
+
deviceScaleFactor: 2,
|
648
|
+
isMobile: true,
|
649
|
+
hasTouch: true,
|
650
|
+
isLandscape: true,
|
651
|
+
},
|
652
|
+
},
|
653
|
+
{
|
654
|
+
name: 'LG Optimus L70',
|
655
|
+
userAgent:
|
656
|
+
'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36',
|
657
|
+
viewport: {
|
658
|
+
width: 384,
|
659
|
+
height: 640,
|
660
|
+
deviceScaleFactor: 1.25,
|
661
|
+
isMobile: true,
|
662
|
+
hasTouch: true,
|
663
|
+
isLandscape: false,
|
664
|
+
},
|
665
|
+
},
|
666
|
+
{
|
667
|
+
name: 'LG Optimus L70 landscape',
|
668
|
+
userAgent:
|
669
|
+
'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36',
|
670
|
+
viewport: {
|
671
|
+
width: 640,
|
672
|
+
height: 384,
|
673
|
+
deviceScaleFactor: 1.25,
|
674
|
+
isMobile: true,
|
675
|
+
hasTouch: true,
|
676
|
+
isLandscape: true,
|
677
|
+
},
|
678
|
+
},
|
679
|
+
{
|
680
|
+
name: 'Microsoft Lumia 550',
|
681
|
+
userAgent:
|
682
|
+
'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263',
|
683
|
+
viewport: {
|
684
|
+
width: 640,
|
685
|
+
height: 360,
|
686
|
+
deviceScaleFactor: 2,
|
687
|
+
isMobile: true,
|
688
|
+
hasTouch: true,
|
689
|
+
isLandscape: false,
|
690
|
+
},
|
691
|
+
},
|
692
|
+
{
|
693
|
+
name: 'Microsoft Lumia 950',
|
694
|
+
userAgent:
|
695
|
+
'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263',
|
696
|
+
viewport: {
|
697
|
+
width: 360,
|
698
|
+
height: 640,
|
699
|
+
deviceScaleFactor: 4,
|
700
|
+
isMobile: true,
|
701
|
+
hasTouch: true,
|
702
|
+
isLandscape: false,
|
703
|
+
},
|
704
|
+
},
|
705
|
+
{
|
706
|
+
name: 'Microsoft Lumia 950 landscape',
|
707
|
+
userAgent:
|
708
|
+
'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263',
|
709
|
+
viewport: {
|
710
|
+
width: 640,
|
711
|
+
height: 360,
|
712
|
+
deviceScaleFactor: 4,
|
713
|
+
isMobile: true,
|
714
|
+
hasTouch: true,
|
715
|
+
isLandscape: true,
|
716
|
+
},
|
717
|
+
},
|
718
|
+
{
|
719
|
+
name: 'Nexus 10',
|
720
|
+
userAgent:
|
721
|
+
'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36',
|
722
|
+
viewport: {
|
723
|
+
width: 800,
|
724
|
+
height: 1280,
|
725
|
+
deviceScaleFactor: 2,
|
726
|
+
isMobile: true,
|
727
|
+
hasTouch: true,
|
728
|
+
isLandscape: false,
|
729
|
+
},
|
730
|
+
},
|
731
|
+
{
|
732
|
+
name: 'Nexus 10 landscape',
|
733
|
+
userAgent:
|
734
|
+
'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36',
|
735
|
+
viewport: {
|
736
|
+
width: 1280,
|
737
|
+
height: 800,
|
738
|
+
deviceScaleFactor: 2,
|
739
|
+
isMobile: true,
|
740
|
+
hasTouch: true,
|
741
|
+
isLandscape: true,
|
742
|
+
},
|
743
|
+
},
|
744
|
+
{
|
745
|
+
name: 'Nexus 4',
|
746
|
+
userAgent:
|
747
|
+
'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
748
|
+
viewport: {
|
749
|
+
width: 384,
|
750
|
+
height: 640,
|
751
|
+
deviceScaleFactor: 2,
|
752
|
+
isMobile: true,
|
753
|
+
hasTouch: true,
|
754
|
+
isLandscape: false,
|
755
|
+
},
|
756
|
+
},
|
757
|
+
{
|
758
|
+
name: 'Nexus 4 landscape',
|
759
|
+
userAgent:
|
760
|
+
'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
761
|
+
viewport: {
|
762
|
+
width: 640,
|
763
|
+
height: 384,
|
764
|
+
deviceScaleFactor: 2,
|
765
|
+
isMobile: true,
|
766
|
+
hasTouch: true,
|
767
|
+
isLandscape: true,
|
768
|
+
},
|
769
|
+
},
|
770
|
+
{
|
771
|
+
name: 'Nexus 5',
|
772
|
+
userAgent:
|
773
|
+
'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
774
|
+
viewport: {
|
775
|
+
width: 360,
|
776
|
+
height: 640,
|
777
|
+
deviceScaleFactor: 3,
|
778
|
+
isMobile: true,
|
779
|
+
hasTouch: true,
|
780
|
+
isLandscape: false,
|
781
|
+
},
|
782
|
+
},
|
783
|
+
{
|
784
|
+
name: 'Nexus 5 landscape',
|
785
|
+
userAgent:
|
786
|
+
'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
787
|
+
viewport: {
|
788
|
+
width: 640,
|
789
|
+
height: 360,
|
790
|
+
deviceScaleFactor: 3,
|
791
|
+
isMobile: true,
|
792
|
+
hasTouch: true,
|
793
|
+
isLandscape: true,
|
794
|
+
},
|
795
|
+
},
|
796
|
+
{
|
797
|
+
name: 'Nexus 5X',
|
798
|
+
userAgent:
|
799
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
800
|
+
viewport: {
|
801
|
+
width: 412,
|
802
|
+
height: 732,
|
803
|
+
deviceScaleFactor: 2.625,
|
804
|
+
isMobile: true,
|
805
|
+
hasTouch: true,
|
806
|
+
isLandscape: false,
|
807
|
+
},
|
808
|
+
},
|
809
|
+
{
|
810
|
+
name: 'Nexus 5X landscape',
|
811
|
+
userAgent:
|
812
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
813
|
+
viewport: {
|
814
|
+
width: 732,
|
815
|
+
height: 412,
|
816
|
+
deviceScaleFactor: 2.625,
|
817
|
+
isMobile: true,
|
818
|
+
hasTouch: true,
|
819
|
+
isLandscape: true,
|
820
|
+
},
|
821
|
+
},
|
822
|
+
{
|
823
|
+
name: 'Nexus 6',
|
824
|
+
userAgent:
|
825
|
+
'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
826
|
+
viewport: {
|
827
|
+
width: 412,
|
828
|
+
height: 732,
|
829
|
+
deviceScaleFactor: 3.5,
|
830
|
+
isMobile: true,
|
831
|
+
hasTouch: true,
|
832
|
+
isLandscape: false,
|
833
|
+
},
|
834
|
+
},
|
835
|
+
{
|
836
|
+
name: 'Nexus 6 landscape',
|
837
|
+
userAgent:
|
838
|
+
'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
839
|
+
viewport: {
|
840
|
+
width: 732,
|
841
|
+
height: 412,
|
842
|
+
deviceScaleFactor: 3.5,
|
843
|
+
isMobile: true,
|
844
|
+
hasTouch: true,
|
845
|
+
isLandscape: true,
|
846
|
+
},
|
847
|
+
},
|
848
|
+
{
|
849
|
+
name: 'Nexus 6P',
|
850
|
+
userAgent:
|
851
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
852
|
+
viewport: {
|
853
|
+
width: 412,
|
854
|
+
height: 732,
|
855
|
+
deviceScaleFactor: 3.5,
|
856
|
+
isMobile: true,
|
857
|
+
hasTouch: true,
|
858
|
+
isLandscape: false,
|
859
|
+
},
|
860
|
+
},
|
861
|
+
{
|
862
|
+
name: 'Nexus 6P landscape',
|
863
|
+
userAgent:
|
864
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
865
|
+
viewport: {
|
866
|
+
width: 732,
|
867
|
+
height: 412,
|
868
|
+
deviceScaleFactor: 3.5,
|
869
|
+
isMobile: true,
|
870
|
+
hasTouch: true,
|
871
|
+
isLandscape: true,
|
872
|
+
},
|
873
|
+
},
|
874
|
+
{
|
875
|
+
name: 'Nexus 7',
|
876
|
+
userAgent:
|
877
|
+
'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36',
|
878
|
+
viewport: {
|
879
|
+
width: 600,
|
880
|
+
height: 960,
|
881
|
+
deviceScaleFactor: 2,
|
882
|
+
isMobile: true,
|
883
|
+
hasTouch: true,
|
884
|
+
isLandscape: false,
|
885
|
+
},
|
886
|
+
},
|
887
|
+
{
|
888
|
+
name: 'Nexus 7 landscape',
|
889
|
+
userAgent:
|
890
|
+
'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36',
|
891
|
+
viewport: {
|
892
|
+
width: 960,
|
893
|
+
height: 600,
|
894
|
+
deviceScaleFactor: 2,
|
895
|
+
isMobile: true,
|
896
|
+
hasTouch: true,
|
897
|
+
isLandscape: true,
|
898
|
+
},
|
899
|
+
},
|
900
|
+
{
|
901
|
+
name: 'Nokia Lumia 520',
|
902
|
+
userAgent:
|
903
|
+
'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)',
|
904
|
+
viewport: {
|
905
|
+
width: 320,
|
906
|
+
height: 533,
|
907
|
+
deviceScaleFactor: 1.5,
|
908
|
+
isMobile: true,
|
909
|
+
hasTouch: true,
|
910
|
+
isLandscape: false,
|
911
|
+
},
|
912
|
+
},
|
913
|
+
{
|
914
|
+
name: 'Nokia Lumia 520 landscape',
|
915
|
+
userAgent:
|
916
|
+
'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)',
|
917
|
+
viewport: {
|
918
|
+
width: 533,
|
919
|
+
height: 320,
|
920
|
+
deviceScaleFactor: 1.5,
|
921
|
+
isMobile: true,
|
922
|
+
hasTouch: true,
|
923
|
+
isLandscape: true,
|
924
|
+
},
|
925
|
+
},
|
926
|
+
{
|
927
|
+
name: 'Nokia N9',
|
928
|
+
userAgent:
|
929
|
+
'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13',
|
930
|
+
viewport: {
|
931
|
+
width: 480,
|
932
|
+
height: 854,
|
933
|
+
deviceScaleFactor: 1,
|
934
|
+
isMobile: true,
|
935
|
+
hasTouch: true,
|
936
|
+
isLandscape: false,
|
937
|
+
},
|
938
|
+
},
|
939
|
+
{
|
940
|
+
name: 'Nokia N9 landscape',
|
941
|
+
userAgent:
|
942
|
+
'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13',
|
943
|
+
viewport: {
|
944
|
+
width: 854,
|
945
|
+
height: 480,
|
946
|
+
deviceScaleFactor: 1,
|
947
|
+
isMobile: true,
|
948
|
+
hasTouch: true,
|
949
|
+
isLandscape: true,
|
950
|
+
},
|
951
|
+
},
|
952
|
+
{
|
953
|
+
name: 'Pixel 2',
|
954
|
+
userAgent:
|
955
|
+
'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
956
|
+
viewport: {
|
957
|
+
width: 411,
|
958
|
+
height: 731,
|
959
|
+
deviceScaleFactor: 2.625,
|
960
|
+
isMobile: true,
|
961
|
+
hasTouch: true,
|
962
|
+
isLandscape: false,
|
963
|
+
},
|
964
|
+
},
|
965
|
+
{
|
966
|
+
name: 'Pixel 2 landscape',
|
967
|
+
userAgent:
|
968
|
+
'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
969
|
+
viewport: {
|
970
|
+
width: 731,
|
971
|
+
height: 411,
|
972
|
+
deviceScaleFactor: 2.625,
|
973
|
+
isMobile: true,
|
974
|
+
hasTouch: true,
|
975
|
+
isLandscape: true,
|
976
|
+
},
|
977
|
+
},
|
978
|
+
{
|
979
|
+
name: 'Pixel 2 XL',
|
980
|
+
userAgent:
|
981
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
982
|
+
viewport: {
|
983
|
+
width: 411,
|
984
|
+
height: 823,
|
985
|
+
deviceScaleFactor: 3.5,
|
986
|
+
isMobile: true,
|
987
|
+
hasTouch: true,
|
988
|
+
isLandscape: false,
|
989
|
+
},
|
990
|
+
},
|
991
|
+
{
|
992
|
+
name: 'Pixel 2 XL landscape',
|
993
|
+
userAgent:
|
994
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36',
|
995
|
+
viewport: {
|
996
|
+
width: 823,
|
997
|
+
height: 411,
|
998
|
+
deviceScaleFactor: 3.5,
|
999
|
+
isMobile: true,
|
1000
|
+
hasTouch: true,
|
1001
|
+
isLandscape: true,
|
853
1002
|
},
|
854
1003
|
},
|
855
1004
|
].map do |json|
|