Skip to content

Commit c5778f5

Browse files
author
jvazquez-r7
committed
Land rapid7#2594, @jvennix-r7's firefox 25 js detection
2 parents 58fa67f + 4425cf1 commit c5778f5

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

data/js/detect/os.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,38 +210,42 @@ window.os_detect.getVersion = function(){
210210
// Thanks to developer.mozilla.org "Firefox for developers" series for most
211211
// of these.
212212
// Release changelogs: http://www.mozilla.org/en-US/firefox/releases/
213-
if ('DeviceStorage' in window && window.DeviceStorage &&
213+
if (css_is_valid('background-attachment',
214+
'backgroundAttachment',
215+
'local')) {
216+
ua_version = '25.0';
217+
} else if ('DeviceStorage' in window && window.DeviceStorage &&
214218
'default' in window.DeviceStorage.prototype) {
215219
// https://bugzilla.mozilla.org/show_bug.cgi?id=874213
216-
ua_version = '24.0'
220+
ua_version = '24.0';
217221
} else if (input_type_is_valid('range')) {
218-
ua_version = '23.0'
222+
ua_version = '23.0';
219223
} else if ('HTMLTimeElement' in window) {
220-
ua_version = '22.0'
224+
ua_version = '22.0';
221225
} else if ('createElement' in document &&
222226
document.createElement('main') &&
223227
document.createElement('main').constructor === window['HTMLElement']) {
224-
ua_version = '21.0'
228+
ua_version = '21.0';
225229
} else if ('imul' in Math) {
226-
ua_version = '20.0'
230+
ua_version = '20.0';
227231
} else if (css_is_valid('font-size', 'fontSize', '23vmax')) {
228-
ua_version = '19.0'
232+
ua_version = '19.0';
229233
} else if ('devicePixelRatio' in window) {
230-
ua_version = '18.0'
234+
ua_version = '18.0';
231235
} else if ('createElement' in document &&
232236
document.createElement('iframe') &&
233237
'sandbox' in document.createElement('iframe')) {
234-
ua_version = '17.0'
238+
ua_version = '17.0';
235239
} else if ('mozApps' in navigator && 'install' in navigator.mozApps) {
236-
ua_version = '16.0'
240+
ua_version = '16.0';
237241
} else if ('HTMLSourceElement' in window &&
238242
HTMLSourceElement.prototype &&
239243
'media' in HTMLSourceElement.prototype) {
240-
ua_version = '15.0'
244+
ua_version = '15.0';
241245
} else if ('mozRequestPointerLock' in document.body) {
242-
ua_version = '14.0'
246+
ua_version = '14.0';
243247
} else if ('Map' in window) {
244-
ua_version = "13.0"
248+
ua_version = "13.0";
245249
} else if ('mozConnection' in navigator) {
246250
ua_version = "12.0";
247251
} else if ('mozVibrate' in navigator) {

0 commit comments

Comments
 (0)