forked from zombieFox/nightTab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.js
More file actions
38 lines (33 loc) · 672 Bytes
/
Copy pathversion.js
File metadata and controls
38 lines (33 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var version = (function() {
var current = "3.19.0";
var compare = function(a, b) {
var pa = a.split(".");
var pb = b.split(".");
for (var i = 0; i < 3; i++) {
var na = Number(pa[i]);
var nb = Number(pb[i]);
if (na > nb) {
return 1;
};
if (nb > na) {
return -1;
};
if (!isNaN(na) && isNaN(nb)) {
return 1;
};
if (isNaN(na) && !isNaN(nb)) {
return -1;
};
};
return 0;
};
var get = function() {
// return chrome.runtime.getManifest().version;
return current;
};
// exposed methods
return {
get: get,
compare: compare
};
})();