Passed
Push — develop ( 7529d2...1089d0 )
by Nikolay
04:46
created

footer.js ➔ isFinite   A

Complexity

Conditions 4

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 12
rs 10
cc 4
1
/*
2
 * MikoPBX - free phone system for small business
3
 * Copyright (C) 2017-2020 Alexey Portnov and Nikolay Beketov
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation; either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License along with this program.
16
 * If not, see <https://www.gnu.org/licenses/>.
17
 */
18
19
// Polyfill for old browsers
20
if (typeof Number.isFinite !== 'function') {
21
	Number.isFinite = function isFinite(value) {
0 ignored issues
show
Compatibility Best Practice introduced by
You are extending the built-in type Number. This may have unintended consequences on other objects using this built-in type. Consider subclassing instead.
Loading history...
22
		// 1. If Type(number) is not Number, return false.
23
		if (typeof value !== 'number') {
24
			return false;
25
		}
26
		// 2. If number is NaN, +∞, or −∞, return false.
27
		if (value !== value || value === Infinity || value === -Infinity) {
28
			return false;
29
		}
30
		// 3. Otherwise, return true.
31
		return true;
32
	};
33
}
34
35
$(document).ready(() => {
36
	$('.popuped').popup();
37
	$('div[data-content], a[data-content]').popup();
38
	$('#loader').removeClass('active');
39
	$('#loader-row').hide();
40
	$('#content-frame').show();
41
});
42